diff --git a/core/src/main/assets/interfaces/badges.png b/core/src/main/assets/interfaces/badges.png index 9a71e236e..83e0d5391 100644 Binary files a/core/src/main/assets/interfaces/badges.png and b/core/src/main/assets/interfaces/badges.png differ diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index bbff0162f..48650b4c1 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -578,9 +578,9 @@ actors.hero.heroclass.duelist_desc=The Duelist starts with a _unique rapier_ wit actors.hero.heroclass.duelist_unlock=To unlock the Duelist _equip a tier 2 or higher weapon with no strength penalty._ actors.hero.heroclass.cleric=cleric -actors.hero.heroclass.cleric_desc_short=The Cleric is a divine spellcaster who uses their unique _holy tome_ to channel divine magic. They can learn and upgrade spells_ via talents. +actors.hero.heroclass.cleric_desc_short=The Cleric is a divine spellcaster who uses their unique _holy tome_ to channel divine magic. They can _learn and upgrade spells_ via talents. actors.hero.heroclass.cleric_desc=The Cleric starts with a _unique holy tome_, which they can use to cast various spells.\n\nMost of the Cleric's talents are focused around learning or upgrading spells.\n\nThe Cleric also starts with _a cudgel_, cloth armor, a waterskin, and a velvet pouch.\n\nThe Cleric automatically identifies:\n_-_ Scrolls of Identify\n_-_ Potions of Purity\n_-_ Scrolls of Remove Curse -actors.hero.heroclass.cleric_unlock=TODO +actors.hero.heroclass.cleric_unlock=To unlock the Cleric _fully cleanse the curse on any piece of cursed equipment._ actors.hero.herosubclass.berserker=berserker actors.hero.herosubclass.berserker_short_desc=The _Berserker_ builds rage as he takes damage. Rage increases his damage and can be activated at 100% for bonus shielding. diff --git a/core/src/main/assets/messages/misc/misc.properties b/core/src/main/assets/messages/misc/misc.properties index 07f4faa3c..9d1ac317a 100644 --- a/core/src/main/assets/messages/misc/misc.properties +++ b/core/src/main/assets/messages/misc/misc.properties @@ -201,6 +201,8 @@ badges$badge.unlock_huntress.title=Huntress Unlocked! badges$badge.unlock_huntress.desc=Unlock the Huntress by hitting enemies with thrown weapons 10 times in one game badges$badge.unlock_duelist.title=Duelist Unlocked! badges$badge.unlock_duelist.desc=Unlock the Duelist by equipping a tier 2 or higher weapon with no strength penalty +badges$badge.unlock_cleric.title=Cleric Unlocked! +badges$badge.unlock_cleric.desc=Unlock the Cleric by fully cleansing the curse on any piece of cursed equipment challenges.no_food=On diet challenges.no_food_desc=Food's already scarce, but you have to watch your portions as well!\n\n- Food and the horn of plenty are one third as effective at satisfying hunger\n- Other sources of satiety are unaffected diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java index bc754f51c..0312b2b0b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java @@ -75,7 +75,7 @@ public class Badges { UNLOCK_ROGUE ( 2 ), UNLOCK_HUNTRESS ( 3 ), UNLOCK_DUELIST ( 4 ), - //UNLOCK_CLERIC ( 5 ), + UNLOCK_CLERIC ( 5 ), //TODO CLERIC icon for this badge MONSTERS_SLAIN_1 ( 6 ), MONSTERS_SLAIN_2 ( 7 ), GOLD_COLLECTED_1 ( 8 ), @@ -979,6 +979,12 @@ public class Badges { } } } + + public static void validateClericUnlock(){ + if (!isUnlocked(Badge.UNLOCK_CLERIC)){ + displayBadge( Badge.UNLOCK_CLERIC ); + } + } public static void validateMasteryCombo( int n ) { if (!local.contains( Badge.MASTERY_COMBO ) && n == 10) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java index 134889e57..418c31a3f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java @@ -44,7 +44,7 @@ public class ShatteredPixelDungeon extends Game { public static final int v2_2_1 = 755; //iOS was 755 (also called v2.2.2), other platforms were 754 public static final int v2_3_2 = 768; public static final int v2_4_2 = 782; - public static final int v2_5_0 = 794; + public static final int v2_5_4 = 802; public ShatteredPixelDungeon( PlatformSupport platform ) { super( sceneClass == null ? WelcomeScene.class : sceneClass, platform ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java index fac472052..332932b1e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java @@ -334,7 +334,7 @@ public enum HeroClass { case DUELIST: return Badges.isUnlocked(Badges.Badge.UNLOCK_DUELIST); case CLERIC: - return true; //TODO CLERIC cleric unlock badge + return Badges.isUnlocked(Badges.Badge.UNLOCK_CLERIC); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java index 4d74e2f19..72ce096cb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade; @@ -147,6 +148,8 @@ public class ScrollOfRemoveCurse extends InventoryScroll { hero.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 ); hero.updateHT( false ); //for ring of might updateQuickslot(); + + Badges.validateClericUnlock(); } return procced; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java index 752da888e..2c487ac1b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java @@ -151,6 +151,7 @@ public class ScrollOfUpgrade extends InventoryScroll { public static void removeCurse( Hero hero ){ GLog.p( Messages.get(ScrollOfUpgrade.class, "remove_curse") ); hero.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 ); + Badges.validateClericUnlock(); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index c9bd3e6d3..10f8fb2e9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -53,7 +53,7 @@ import java.util.Collections; public class WelcomeScene extends PixelScene { - private static final int LATEST_UPDATE = ShatteredPixelDungeon.v2_5_0; + private static final int LATEST_UPDATE = ShatteredPixelDungeon.v2_5_4; //used so that the game does not keep showing the window forever if cleaning fails private static boolean triedCleaningTemp = false; @@ -239,24 +239,18 @@ public class WelcomeScene extends PixelScene { Badges.loadGlobal(); Journal.loadGlobal(); + //pre-unlock Cleric for those who already have a win + if (previousVersion <= ShatteredPixelDungeon.v2_5_4){ + if (Badges.isUnlocked(Badges.Badge.VICTORY) && !Badges.isUnlocked(Badges.Badge.UNLOCK_CLERIC)){ + Badges.unlock(Badges.Badge.UNLOCK_CLERIC); + } + } + if (previousVersion <= ShatteredPixelDungeon.v2_4_2){ //Dwarf King's final journal entry changed, set it as un-read if (Document.HALLS_KING.isPageRead(Document.KING_ATTRITION)){ Document.HALLS_KING.unreadPage(Document.KING_ATTRITION); } - - //don't victory nag people who have already gotten a win in older versions - if (Badges.isUnlocked(Badges.Badge.VICTORY)){ - //TODO commented out for the beta as we want to test the window! - //SPDSettings.victoryNagged(true); - } - } - - //pre-unlock Duelist for those who already have a win - if (previousVersion <= ShatteredPixelDungeon.v2_0_2){ - if (Badges.isUnlocked(Badges.Badge.VICTORY) && !Badges.isUnlocked(Badges.Badge.UNLOCK_DUELIST)){ - Badges.unlock(Badges.Badge.UNLOCK_DUELIST); - } } try {