v3.0.0: added an unlock condition/badge for the cleric

This commit is contained in:
Evan Debenham
2024-10-11 15:21:06 -04:00
parent 53acf6cfc6
commit f183e3219f
9 changed files with 25 additions and 19 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -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.

View File

@@ -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

View File

@@ -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) {

View File

@@ -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 );

View File

@@ -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);
}
}

View File

@@ -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;

View File

@@ -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

View File

@@ -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 {