Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRANSLATED Pixel Dungeon #23

Open
wants to merge 83 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
1440247
Translate
rodriformiga Aug 27, 2014
e13887c
Translate - Part 1
rodriformiga Aug 27, 2014
ac92330
Delete .settings Folder
rodriformiga Aug 27, 2014
6dbad9e
Translate - Part 2
rodriformiga Aug 28, 2014
70d1dff
Translate - Part 3 - Armor Glyphs
rodriformiga Aug 28, 2014
598193b
Translate - Part 4 - Bags
rodriformiga Aug 28, 2014
c37d2f2
Translate - Part 5 - Food
rodriformiga Aug 28, 2014
2e39136
Translate - Part 6 - Keys
rodriformiga Aug 28, 2014
6115f46
Translate - Part 7 - Potions
rodriformiga Aug 29, 2014
4f9c15d
Translate - Part 7 - Quest
rodriformiga Aug 31, 2014
8eb0579
Translate - Part 8 - Rings
rodriformiga Sep 4, 2014
b797183
Translate - Part 9 - Scrolls
rodriformiga Sep 8, 2014
fa20637
Translate - Part 9 - Wands/Melee
rodriformiga Oct 20, 2014
d508ee9
MERGE FORK - Translate - Part 11 - Missiles
rodriformiga Oct 22, 2014
02aae94
Translate Corrections
rodriformiga Oct 22, 2014
0ddf4a8
Translation Adjusts
rodriformiga Oct 23, 2014
3266a59
Translate - Part 11 - Blobs/Buffs/Mobs/NPCs
rodriformiga Oct 25, 2014
384ee68
Translate - Part 12 - Weapon Enchantments
rodriformiga Oct 25, 2014
3197b92
Translate - Part 13 - Levels & Level Features
rodriformiga Oct 28, 2014
0387eab
Translate - Part 14 - Small Adjusts
rodriformiga Nov 13, 2014
42ad04f
Translate - Part 15 - Fonts Adjusts
rodriformiga Nov 15, 2014
eacafda
Translate - Part 16 - Final Adjust
rodriformiga Nov 15, 2014
90507d0
Enhanced Translation
rodriformiga Nov 23, 2014
e790def
Write here Translation Credits
rodriformiga Jan 3, 2015
7a749e7
Merge remote-tracking branch 'upstream/master'
rodriformiga Jan 30, 2015
98a8333
Translate - Version 1.7.5 Itens
rodriformiga Jan 30, 2015
786d12e
Adjust Description
rodriformiga Feb 28, 2015
fca1fa7
Merge remote-tracking branch 'upstream/master'
rodriformiga Feb 28, 2015
23b285c
Bug Fixed: Move on Death
rodriformiga Apr 2, 2015
5d366cb
Quickslot in Global Settings
rodriformiga Mar 28, 2015
c7770bf
Some Adjustments (BR)
rodriformiga Apr 17, 2015
01f8e32
Start a Spanish Translate
rodriformiga Apr 17, 2015
d0169b6
Spanish Translate - 2
rodriformiga May 13, 2015
b9c4332
Spanish Translate - 3
rodriformiga Jun 26, 2015
6a52a64
English Adjust (WandHolster_Info text)
rodriformiga Jun 26, 2015
5e69f23
Spanish Translate - 4
rodriformiga Jun 27, 2015
6387c9f
Spanish Translate - 5
rodriformiga Jun 27, 2015
7a15180
Portuguese Fix (Potion of Might)
rodriformiga Jun 27, 2015
e8318b2
Spanish Translate - 6
rodriformiga Jul 9, 2015
a7d1077
Portuguese Fix
rodriformiga Jul 9, 2015
6daeb88
Spanish Translate - 7
rodriformiga Jul 9, 2015
5b3065e
Spanish Transate - 8 - Final
rodriformiga Jul 13, 2015
ba02bbe
Merge branch 'Spanish'
rodriformiga Jul 13, 2015
151520d
Portuguese Fix
rodriformiga Jul 13, 2015
7930288
French Translate - 1 - Init
rodriformiga Jul 17, 2015
c20aea5
Portuguese & Spanish fix - Badge Ring
rodriformiga Jul 17, 2015
9928130
French Translate - 2
rodriformiga Jul 17, 2015
3bb305b
French Translate - 3
rodriformiga Jul 24, 2015
e5d683b
French Translate - 4
rodriformiga Jul 30, 2015
99b82b1
French Translate - 5
rodriformiga Jul 31, 2015
33d140a
French Translate - 6
rodriformiga Jul 31, 2015
3f0271b
French Translate - 7
rodriformiga Jul 31, 2015
460a732
French Translate - 8
rodriformiga Aug 1, 2015
72e4301
Frech Translate - 9 - Final
rodriformiga Aug 1, 2015
1d2e7ee
Merge branch 'French'
rodriformiga Aug 1, 2015
0f9af8a
Create Language Selector
rodriformiga Aug 1, 2015
fdb0d2b
Polish Translation - Full
rodriformiga Aug 8, 2015
93fa9ec
Polish Menu Language
rodriformiga Aug 8, 2015
eec3bef
Spanish Pontuaction
rodriformiga Aug 17, 2015
f89e201
Polish Fonts
rodriformiga Aug 26, 2015
ed29faf
Languages Menu
rodriformiga Aug 26, 2015
31d039e
Multi-line Font
rodriformiga Aug 29, 2015
573c8af
Portuguese Fix
rodriformiga Oct 2, 2015
96d4db9
Merge remote-tracking branch 'watabou/master'
rodriformiga Oct 2, 2015
975f35c
Translate 1.9.1 - Existing Strings
rodriformiga Oct 2, 2015
8d6a9d6
Translate 1.9.1 - New Items
rodriformiga Oct 4, 2015
6309f28
Portuguese Fixes
rodriformiga Oct 5, 2015
364779c
Spanish Fixes
rodriformiga Oct 5, 2015
4c1d45a
Clean-up & Reorganize
rodriformiga Oct 13, 2015
b402364
English Fixes
rodriformiga Oct 27, 2015
bb7557f
Refresh Readme File
rodriformiga Oct 28, 2015
28c055c
Text fixes
rodriformiga Nov 24, 2015
277ea3c
Prepare for Russian
rodriformiga Nov 25, 2015
93aca36
Russian Translation - Full
rodriformiga Nov 28, 2015
30c94a1
Game Fixes
rodriformiga Dec 31, 2015
c608512
Fix Polish
rodriformiga Jan 26, 2016
da8ee68
Chinese Full
rodriformiga Jan 26, 2016
18460eb
Prepare for German
rodriformiga Jan 27, 2016
23b0af4
German Translation - Full
rodriformiga Mar 17, 2016
0086264
Text fixes
rodriformiga Mar 23, 2016
8767280
Replace FloatMath
rodriformiga Mar 23, 2016
68096ac
Russian font fix
rodriformiga Mar 24, 2016
59d5f8d
Readme fix
rodriformiga Dec 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.project
project.properties
proguard.cfg
lint.xml

# Built application files
*.apk
Expand All @@ -26,3 +27,6 @@ local.properties

# Proguard folder generated by Eclipse
proguard/

# .settings folder generated by Eclipse
.settings/
12 changes: 6 additions & 6 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.watabou.pixeldungeon"
android:versionCode="70"
android:versionName="1.7.5a"
android:versionCode="74"
android:versionName="1.9.1T"
android:installLocation="auto">

<uses-permission android:name="android.permission.VIBRATE"/>

<uses-sdk
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="20"/>
android:targetSdkVersion="21"/>

<uses-feature
android:glEsVersion="0x00020000"/>
Expand All @@ -24,7 +24,7 @@
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:allowBackup="false">
android:allowBackup="true">

<activity
android:label="@string/app_name"
Expand All @@ -37,4 +37,4 @@
</activity>
</application>

</manifest>
</manifest>
49 changes: 46 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,56 @@ Pixel Dungeon
Traditional roguelike game with pixel-art graphics and simple interface.

Pixel Dungeon on GooglePlay:
https://play.google.com/store/apps/details?id=com.watabou.pixeldungeon
https://play.google.com/store/apps/details?id=br.com.rodriformiga.pixeldungeon

Official web-site:
http://pixeldungeon.watabou.ru/

Developer's blog:
Developer's Official blog:
http://pixeldungeon.tumblr.com/

To build the game you will need my unnamed game library:
https://github.com/watabou/PD-classes
https://github.com/rodriformiga/PD-classes



Translating Pixel Dungeon
=============

> **It was a great mission, but with much effort, all texts, phrases, words and other strings were copied all the source code of the game and grouped into a single file. The ```string.xml``` file.**

By grouping all the strings of the game, it becomes possible to take advantage of translation support android as described in [Andoid Guide](http://developer.android.com/training/basics/supporting-devices/languages.html).


-----
##### To translate the game in [Transifex](https://www.transifex.com/pixel-dungeon/pixel-1/)

* You can make or help translate the online game, accessed the website:
* https://www.transifex.com/pixel-dungeon/pixel-1/
* It is very simple to use, especially for those without programming skills. If you have questions on how to use the program or want me to generate a version for testing, you can contact me via e-mail [email protected]
* When a translation is done into any language, the translation is downloaded, reviewed and compiled, and a new Pixel version is released. This normally occurs once every 2 months.


-----
##### To translate the game in Eclipse:

1. Copy the contents of the folder [/res/values](res/values/) to a new directory with the corresponding site to be translated like as [/res/values-fr](res/values-fr) for a translation into French.
2. After making the copy, simply translating the content of all tags within the [strings.xml](res/values/strings.xml) file in your new directory.
3. After that, please test your game translated. :wink::video_game:

-----

**NOTE:** Currently, the font files have the characters below. Any character other than those below, will _**not appear in the game**_.
Following valid characters:
```
!¡\"#$%&'()*+,-./0123456789:;<=>?¿@
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`
abcdefghijklmnopqrstuvwxyz{|}~\u007F
àáâäãąèéêëęìíîïòóôöõùúûüñńçćłśźż
ÀÁÂÄÃĄÈÉÊËĘÌÍÎÏÒÓÔÖÕÙÚÛÜÑŃÇĆŁŚŹŻºß
Б ГДЖЗИЙЛ П УФЦЧШЩЪЫЬЭЮЯ
бвгджзийлмнптуфцчшщъыьэюя
```


**Help us make the Pixel Dungeon best and join the translations of the game**
Binary file modified assets/arcs1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/arcs2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/avatars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/buffs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/font15x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/font1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/font25x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/font2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/font3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/hp_bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/large_buffs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/locked_badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/mage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/ranger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/rogue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/status_pane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/toolbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/warrior.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,657 changes: 1,657 additions & 0 deletions res/values-de/strings.xml

Large diffs are not rendered by default.

1,657 changes: 1,657 additions & 0 deletions res/values-es/strings.xml

Large diffs are not rendered by default.

1,657 changes: 1,657 additions & 0 deletions res/values-fr/strings.xml

Large diffs are not rendered by default.

1,657 changes: 1,657 additions & 0 deletions res/values-pl/strings.xml

Large diffs are not rendered by default.

1,657 changes: 1,657 additions & 0 deletions res/values-pt-rBR/strings.xml

Large diffs are not rendered by default.

1,657 changes: 1,657 additions & 0 deletions res/values-ru/strings.xml

Large diffs are not rendered by default.

1,657 changes: 1,657 additions & 0 deletions res/values-zh-rTW/strings.xml

Large diffs are not rendered by default.

1,667 changes: 1,665 additions & 2 deletions res/values/strings.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/com/watabou/pixeldungeon/Assets.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class Assets {

public static final String BANNERS = "banners.png";
public static final String BADGES = "badges.png";
public static final String LOCKED = "locked_badge.png";
public static final String AMULET = "amulet.png";

public static final String CHROME = "chrome.png";
Expand Down
153 changes: 79 additions & 74 deletions src/com/watabou/pixeldungeon/Badges.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,43 +51,43 @@
public class Badges {

public static enum Badge {
MONSTERS_SLAIN_1( "10 enemies slain", 0 ),
MONSTERS_SLAIN_2( "50 enemies slain", 1 ),
MONSTERS_SLAIN_3( "150 enemies slain", 2 ),
MONSTERS_SLAIN_4( "250 enemies slain", 3 ),
GOLD_COLLECTED_1( "100 gold collected", 4 ),
GOLD_COLLECTED_2( "500 gold collected", 5 ),
GOLD_COLLECTED_3( "2500 gold collected", 6 ),
GOLD_COLLECTED_4( "7500 gold collected", 7 ),
LEVEL_REACHED_1( "Level 6 reached", 8 ),
LEVEL_REACHED_2( "Level 12 reached", 9 ),
LEVEL_REACHED_3( "Level 18 reached", 10 ),
LEVEL_REACHED_4( "Level 24 reached", 11 ),
ALL_POTIONS_IDENTIFIED( "All potions identified", 16 ),
ALL_SCROLLS_IDENTIFIED( "All scrolls identified", 17 ),
ALL_RINGS_IDENTIFIED( "All rings identified", 18 ),
ALL_WANDS_IDENTIFIED( "All wands identified", 19 ),
ALL_ITEMS_IDENTIFIED( "All potions, scrolls, rings & wands identified", 35, true ),
MONSTERS_SLAIN_1(Game.getVar(R.string.Badges_MonsterSlain1), 0 ),
MONSTERS_SLAIN_2(Game.getVar(R.string.Badges_MonsterSlain2), 1 ),
MONSTERS_SLAIN_3(Game.getVar(R.string.Badges_MonsterSlain3), 2 ),
MONSTERS_SLAIN_4(Game.getVar(R.string.Badges_MonsterSlain4), 3 ),
GOLD_COLLECTED_1(Game.getVar(R.string.Badges_GoldColleted1), 4 ),
GOLD_COLLECTED_2(Game.getVar(R.string.Badges_GoldColleted2), 5 ),
GOLD_COLLECTED_3(Game.getVar(R.string.Badges_GoldColleted3), 6 ),
GOLD_COLLECTED_4(Game.getVar(R.string.Badges_GoldColleted4), 7 ),
LEVEL_REACHED_1(Game.getVar(R.string.Badges_LevelReached1), 8 ),
LEVEL_REACHED_2(Game.getVar(R.string.Badges_LevelReached2), 9 ),
LEVEL_REACHED_3(Game.getVar(R.string.Badges_LevelReached3), 10 ),
LEVEL_REACHED_4(Game.getVar(R.string.Badges_LevelReached4), 11 ),
ALL_POTIONS_IDENTIFIED(Game.getVar(R.string.Badges_AllPotions), 16 ),
ALL_SCROLLS_IDENTIFIED(Game.getVar(R.string.Badges_AllScrolls), 17 ),
ALL_RINGS_IDENTIFIED(Game.getVar(R.string.Badges_AllRings), 18 ),
ALL_WANDS_IDENTIFIED(Game.getVar(R.string.Badges_AllWands), 19 ),
ALL_ITEMS_IDENTIFIED(Game.getVar(R.string.Badges_AllItems), 35, true ),
BAG_BOUGHT_SEED_POUCH,
BAG_BOUGHT_SCROLL_HOLDER,
BAG_BOUGHT_WAND_HOLSTER,
ALL_BAGS_BOUGHT( "All bags bought", 23 ),
DEATH_FROM_FIRE( "Death from fire", 24 ),
DEATH_FROM_POISON( "Death from poison", 25 ),
DEATH_FROM_GAS( "Death from toxic gas", 26 ),
DEATH_FROM_HUNGER( "Death from hunger", 27 ),
DEATH_FROM_GLYPH( "Death from an enchantment", 57 ),
DEATH_FROM_FALLING( "Death from falling down", 59 ),
YASD( "Death from fire, poison, toxic gas & hunger", 34, true ),
ALL_BAGS_BOUGHT(Game.getVar(R.string.Badges_AllBags), 23 ),
DEATH_FROM_FIRE(Game.getVar(R.string.Badges_DeathFire), 24 ),
DEATH_FROM_POISON(Game.getVar(R.string.Badges_DeathPoison), 25 ),
DEATH_FROM_GAS(Game.getVar(R.string.Badges_DeathGas), 26 ),
DEATH_FROM_HUNGER(Game.getVar(R.string.Badges_DeathHunger), 27 ),
DEATH_FROM_GLYPH(Game.getVar(R.string.Badges_DeathGlyph), 57 ),
DEATH_FROM_FALLING(Game.getVar(R.string.Badges_DeathFalling), 59 ),
YASD(Game.getVar(R.string.Badges_Yasd), 34, true ),
BOSS_SLAIN_1_WARRIOR,
BOSS_SLAIN_1_MAGE,
BOSS_SLAIN_1_ROGUE,
BOSS_SLAIN_1_HUNTRESS,
BOSS_SLAIN_1( "1st boss slain", 12 ),
BOSS_SLAIN_2( "2nd boss slain", 13 ),
BOSS_SLAIN_3( "3rd boss slain", 14 ),
BOSS_SLAIN_4( "4th boss slain", 15 ),
BOSS_SLAIN_1_ALL_CLASSES( "1st boss slain by Warrior, Mage, Rogue & Huntress", 32, true ),
BOSS_SLAIN_1(Game.getVar(R.string.Badges_BossSlain1), 12 ),
BOSS_SLAIN_2(Game.getVar(R.string.Badges_BossSlain2), 13 ),
BOSS_SLAIN_3(Game.getVar(R.string.Badges_BossSlain3), 14 ),
BOSS_SLAIN_4(Game.getVar(R.string.Badges_BossSlain4), 15 ),
BOSS_SLAIN_1_ALL_CLASSES(Game.getVar(R.string.Badges_BossSlain1All), 32, true ),
BOSS_SLAIN_3_GLADIATOR,
BOSS_SLAIN_3_BERSERKER,
BOSS_SLAIN_3_WARLOCK,
Expand All @@ -96,54 +96,53 @@ public static enum Badge {
BOSS_SLAIN_3_ASSASSIN,
BOSS_SLAIN_3_SNIPER,
BOSS_SLAIN_3_WARDEN,
BOSS_SLAIN_3_ALL_SUBCLASSES(
"3rd boss slain by Gladiator, Berserker, Warlock, Battlemage, Freerunner, Assassin, Sniper & Warden", 33, true ),
RING_OF_HAGGLER( "Ring of Haggler obtained", 20 ),
RING_OF_THORNS( "Ring of Thorns obtained", 21 ),
STRENGTH_ATTAINED_1( "13 points of Strength attained", 40 ),
STRENGTH_ATTAINED_2( "15 points of Strength attained", 41 ),
STRENGTH_ATTAINED_3( "17 points of Strength attained", 42 ),
STRENGTH_ATTAINED_4( "19 points of Strength attained", 43 ),
FOOD_EATEN_1( "10 pieces of food eaten", 44 ),
FOOD_EATEN_2( "20 pieces of food eaten", 45 ),
FOOD_EATEN_3( "30 pieces of food eaten", 46 ),
FOOD_EATEN_4( "40 pieces of food eaten", 47 ),
BOSS_SLAIN_3_ALL_SUBCLASSES(Game.getVar(R.string.Badges_BossSlain3All), 33, true ),
RING_OF_HAGGLER(Game.getVar(R.string.Badges_RingHaggler), 20 ),
RING_OF_THORNS(Game.getVar(R.string.Badges_RingThorns), 21 ),
STRENGTH_ATTAINED_1(Game.getVar(R.string.Badges_StrengthAttained1), 40 ),
STRENGTH_ATTAINED_2(Game.getVar(R.string.Badges_StrengthAttained2), 41 ),
STRENGTH_ATTAINED_3(Game.getVar(R.string.Badges_StrengthAttained3), 42 ),
STRENGTH_ATTAINED_4(Game.getVar(R.string.Badges_StrengthAttained4), 43 ),
FOOD_EATEN_1(Game.getVar(R.string.Badges_FoodEaten1), 44 ),
FOOD_EATEN_2(Game.getVar(R.string.Badges_FoodEaten2), 45 ),
FOOD_EATEN_3(Game.getVar(R.string.Badges_FoodEaten3), 46 ),
FOOD_EATEN_4(Game.getVar(R.string.Badges_FoodEaten4), 47 ),
MASTERY_WARRIOR,
MASTERY_MAGE,
MASTERY_ROGUE,
MASTERY_HUNTRESS,
ITEM_LEVEL_1( "Item of level 3 acquired", 48 ),
ITEM_LEVEL_2( "Item of level 6 acquired", 49 ),
ITEM_LEVEL_3( "Item of level 9 acquired", 50 ),
ITEM_LEVEL_4( "Item of level 12 acquired", 51 ),
ITEM_LEVEL_1(Game.getVar(R.string.Badges_ItemLvl1), 48 ),
ITEM_LEVEL_2(Game.getVar(R.string.Badges_ItemLvl2), 49 ),
ITEM_LEVEL_3(Game.getVar(R.string.Badges_ItemLvl3), 50 ),
ITEM_LEVEL_4(Game.getVar(R.string.Badges_ItemLvl4), 51 ),
RARE_ALBINO,
RARE_BANDIT,
RARE_SHIELDED,
RARE_SENIOR,
RARE_ACIDIC,
RARE( "All rare monsters slain", 37, true ),
RARE(Game.getVar(R.string.Badges_RareAll), 37, true ),
VICTORY_WARRIOR,
VICTORY_MAGE,
VICTORY_ROGUE,
VICTORY_HUNTRESS,
VICTORY( "Amulet of Yendor obtained", 22 ),
VICTORY_ALL_CLASSES( "Amulet of Yendor obtained by Warrior, Mage, Rogue & Huntress", 36, true ),
MASTERY_COMBO( "7-hit combo", 56 ),
POTIONS_COOKED_1( "3 potions cooked", 52 ),
POTIONS_COOKED_2( "6 potions cooked", 53 ),
POTIONS_COOKED_3( "9 potions cooked", 54 ),
POTIONS_COOKED_4( "12 potions cooked", 55 ),
NO_MONSTERS_SLAIN( "Level completed without killing any monsters", 28 ),
GRIM_WEAPON( "Monster killed by a Grim weapon", 29 ),
PIRANHAS( "6 piranhas killed", 30 ),
NIGHT_HUNTER( "15 monsters killed at nighttime", 58 ),
GAMES_PLAYED_1( "10 games played", 60, true ),
GAMES_PLAYED_2( "100 games played", 61, true ),
GAMES_PLAYED_3( "500 games played", 62, true ),
GAMES_PLAYED_4( "2000 games played", 63, true ),
HAPPY_END( "Happy end", 38 ),
CHAMPION( "Challenge won", 39, true ),
SUPPORTER( "Thanks for your support!", 31, true );
VICTORY(Game.getVar(R.string.Badges_Victory), 22 ),
VICTORY_ALL_CLASSES(Game.getVar(R.string.Badges_VictoryAll), 36, true ),
MASTERY_COMBO(Game.getVar(R.string.Badges_MasteryCombo), 56 ),
POTIONS_COOKED_1(Game.getVar(R.string.Badges_PotionsCooked1), 52 ),
POTIONS_COOKED_2(Game.getVar(R.string.Badges_PotionsCooked2), 53 ),
POTIONS_COOKED_3(Game.getVar(R.string.Badges_PotionsCooked3), 54 ),
POTIONS_COOKED_4(Game.getVar(R.string.Badges_PotionsCooked4), 55 ),
NO_MONSTERS_SLAIN(Game.getVar(R.string.Badges_NoMonsterSlain), 28 ),
GRIM_WEAPON(Game.getVar(R.string.Badges_GrimWepon), 29 ),
PIRANHAS(Game.getVar(R.string.Badges_Piranhas), 30 ),
NIGHT_HUNTER(Game.getVar(R.string.Badges_NightHunter), 58 ),
GAMES_PLAYED_1(Game.getVar(R.string.Badges_GamesPlayed1), 60, true ),
GAMES_PLAYED_2(Game.getVar(R.string.Badges_GamesPlayed2), 61, true ),
GAMES_PLAYED_3(Game.getVar(R.string.Badges_GamesPlayed3), 62, true ),
GAMES_PLAYED_4(Game.getVar(R.string.Badges_GamesPlayed4), 63, true ),
HAPPY_END(Game.getVar(R.string.Badges_HappyEnd), 38 ),
CHAMPION(Game.getVar(R.string.Badges_Champion), 39, true ),
SUPPORTER(Game.getVar(R.string.Badges_Supporter), 31, true );

public boolean meta;

Expand Down Expand Up @@ -408,19 +407,19 @@ public static void validateItemLevelAquired( Item item ) {

Badge badge = null;

if (!local.contains( Badge.ITEM_LEVEL_1 ) && item.level >= 3) {
if (!local.contains( Badge.ITEM_LEVEL_1 ) && item.level() >= 3) {
badge = Badge.ITEM_LEVEL_1;
local.add( badge );
}
if (!local.contains( Badge.ITEM_LEVEL_2 ) && item.level >= 6) {
if (!local.contains( Badge.ITEM_LEVEL_2 ) && item.level() >= 6) {
badge = Badge.ITEM_LEVEL_2;
local.add( badge );
}
if (!local.contains( Badge.ITEM_LEVEL_3 ) && item.level >= 9) {
if (!local.contains( Badge.ITEM_LEVEL_3 ) && item.level() >= 9) {
badge = Badge.ITEM_LEVEL_3;
local.add( badge );
}
if (!local.contains( Badge.ITEM_LEVEL_4 ) && item.level >= 12) {
if (!local.contains( Badge.ITEM_LEVEL_4 ) && item.level() >= 12) {
badge = Badge.ITEM_LEVEL_4;
local.add( badge );
}
Expand Down Expand Up @@ -861,7 +860,7 @@ private static void displayBadge( Badge badge ) {
if (global.contains( badge )) {

if (!badge.meta) {
GLog.h( "Badge endorsed: %s", badge.description );
GLog.h(Game.getVar(R.string.Badges_Info1), badge.description );
}

} else {
Expand All @@ -870,9 +869,9 @@ private static void displayBadge( Badge badge ) {
saveNeeded = true;

if (badge.meta) {
GLog.h( "New super badge: %s", badge.description );
GLog.h(Game.getVar(R.string.Badges_Info2), badge.description );
} else {
GLog.h( "New badge: %s", badge.description );
GLog.h(Game.getVar(R.string.Badges_Info3), badge.description );
}
PixelScene.showBadge( badge );
}
Expand All @@ -892,11 +891,11 @@ public static List<Badge> filtered( boolean global ) {

HashSet<Badge> filtered = new HashSet<Badge>( global ? Badges.global : Badges.local );

if (!global) {
{
Iterator<Badge> iterator = filtered.iterator();
while (iterator.hasNext()) {
Badge badge = iterator.next();
if (badge.meta) {
if ((!global && badge.meta) || badge.image == -1) {
iterator.remove();
}
}
Expand All @@ -915,7 +914,13 @@ public static List<Badge> filtered( boolean global ) {
leaveBest( filtered, Badge.DEATH_FROM_GAS, Badge.YASD );
leaveBest( filtered, Badge.DEATH_FROM_HUNGER, Badge.YASD );
leaveBest( filtered, Badge.DEATH_FROM_POISON, Badge.YASD );
leaveBest( filtered, Badge.ALL_POTIONS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED );
leaveBest( filtered, Badge.ALL_SCROLLS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED );
leaveBest( filtered, Badge.ALL_RINGS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED );
leaveBest( filtered, Badge.ALL_WANDS_IDENTIFIED, Badge.ALL_ITEMS_IDENTIFIED );
leaveBest( filtered, Badge.VICTORY, Badge.VICTORY_ALL_CLASSES );
leaveBest( filtered, Badge.VICTORY, Badge.HAPPY_END );
leaveBest( filtered, Badge.VICTORY, Badge.CHAMPION );
leaveBest( filtered, Badge.GAMES_PLAYED_1, Badge.GAMES_PLAYED_2, Badge.GAMES_PLAYED_3, Badge.GAMES_PLAYED_4 );

ArrayList<Badge> list = new ArrayList<Badge>( filtered );
Expand Down
4 changes: 2 additions & 2 deletions src/com/watabou/pixeldungeon/Bones.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public static Item get() {
item.cursedKnown = true;
if (item.isUpgradable()) {
int lvl = (Dungeon.depth - 1) * 3 / 5 + 1;
if (lvl < item.level) {
item.degrade( item.level - lvl );
if (lvl < item.level()) {
item.degrade( item.level() - lvl );
}
item.levelKnown = false;
}
Expand Down
12 changes: 3 additions & 9 deletions src/com/watabou/pixeldungeon/Challenges.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/
package com.watabou.pixeldungeon;

import com.watabou.noosa.Game;

public class Challenges {

public static final int NO_FOOD = 1;
Expand All @@ -27,15 +29,7 @@ public class Challenges {
public static final int DARKNESS = 32;
public static final int NO_SCROLLS = 64;

public static final String[] NAMES = {
"On diet",
"Faith is my armor",
"Pharmacophobia",
"Barren land",
"Swarm intelligence",
"Into darkness",
"Forbidden runes"
};
public static final String[] NAMES = Game.getVars(R.array.Challenges_Names);

public static final int[] MASKS = {
NO_FOOD, NO_ARMOR, NO_HEALING, NO_HERBALISM, SWARM_INTELLIGENCE, DARKNESS, NO_SCROLLS
Expand Down
Loading