v3.3.0: added a badge for a fully randomized victory
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
@@ -210,6 +210,8 @@ badges$badge.pacifist_ascent.title=Pacifist Ascent
|
||||
badges$badge.pacifist_ascent.desc=Take the Amulet of Yendor to the surface without ever reducing the severity of its curse
|
||||
badges$badge.taking_the_mick.title=Taking the Mick
|
||||
badges$badge.taking_the_mick.desc=Strike the killing blow on the final boss with a +20 or higher pickaxe
|
||||
badges$badge.victory_random.title=Randomized Victory!
|
||||
badges$badge.victory_random.desc=Obtain the Amulet of Yendor with a randomized hero, talent upgrades, subclass, and armor ability.
|
||||
|
||||
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
|
||||
|
||||
@@ -172,8 +172,9 @@ public class Badges {
|
||||
ITEM_LEVEL_5 ( 97 ),
|
||||
LEVEL_REACHED_5 ( 98 ),
|
||||
HAPPY_END ( 99 ),
|
||||
HAPPY_END_REMAINS ( 100 ),
|
||||
RODNEY ( 101, BadgeType.JOURNAL ),
|
||||
VICTORY_RANDOM ( 100 ),
|
||||
HAPPY_END_REMAINS ( 101 ),
|
||||
RODNEY ( 102, BadgeType.JOURNAL ),
|
||||
ALL_WEAPONS_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
ALL_ARMOR_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
ALL_WANDS_IDENTIFIED , //still exists internally for pre-2.5 saves
|
||||
@@ -184,8 +185,8 @@ public class Badges {
|
||||
VICTORY_HUNTRESS,
|
||||
VICTORY_DUELIST,
|
||||
VICTORY_CLERIC,
|
||||
VICTORY_ALL_CLASSES ( 102, BadgeType.GLOBAL ),
|
||||
DEATH_FROM_ALL ( 103, BadgeType.GLOBAL ),
|
||||
VICTORY_ALL_CLASSES ( 103, BadgeType.GLOBAL ),
|
||||
DEATH_FROM_ALL ( 104, BadgeType.GLOBAL ),
|
||||
BOSS_SLAIN_3_GLADIATOR,
|
||||
BOSS_SLAIN_3_BERSERKER,
|
||||
BOSS_SLAIN_3_WARLOCK,
|
||||
@@ -198,13 +199,13 @@ public class Badges {
|
||||
BOSS_SLAIN_3_MONK,
|
||||
BOSS_SLAIN_3_PRIEST,
|
||||
BOSS_SLAIN_3_PALADIN,
|
||||
BOSS_SLAIN_3_ALL_SUBCLASSES ( 104, BadgeType.GLOBAL ),
|
||||
BOSS_CHALLENGE_3 ( 105 ),
|
||||
BOSS_CHALLENGE_4 ( 106 ),
|
||||
RESEARCHER_4 ( 107, BadgeType.JOURNAL ),
|
||||
GAMES_PLAYED_4 ( 108, BadgeType.GLOBAL ),
|
||||
HIGH_SCORE_4 ( 109 ),
|
||||
CHAMPION_1 ( 110 ),
|
||||
BOSS_SLAIN_3_ALL_SUBCLASSES ( 105, BadgeType.GLOBAL ),
|
||||
BOSS_CHALLENGE_3 ( 106 ),
|
||||
BOSS_CHALLENGE_4 ( 107 ),
|
||||
RESEARCHER_4 ( 108, BadgeType.JOURNAL ),
|
||||
GAMES_PLAYED_4 ( 109, BadgeType.GLOBAL ),
|
||||
HIGH_SCORE_4 ( 110 ),
|
||||
CHAMPION_1 ( 111 ),
|
||||
|
||||
//diamond
|
||||
PACIFIST_ASCENT ( 120 ),
|
||||
@@ -1018,6 +1019,15 @@ public class Badges {
|
||||
local.add( badge );
|
||||
displayBadge( badge );
|
||||
|
||||
//technically player can also not spend talent points if they want for some reason
|
||||
if (Statistics.qualifiedForRandomVictoryBadge
|
||||
&& Dungeon.hero.subClass != null
|
||||
&& Dungeon.hero.armorAbility != null){
|
||||
badge = Badge.VICTORY_RANDOM;
|
||||
local.add( badge );
|
||||
displayBadge( badge );
|
||||
}
|
||||
|
||||
badge = victoryClassBadges.get(Dungeon.hero.heroClass);
|
||||
if (badge == null) return;
|
||||
local.add( badge );
|
||||
|
||||
@@ -42,6 +42,7 @@ public class GamesInProgress {
|
||||
public static int curSlot;
|
||||
|
||||
public static HeroClass selectedClass;
|
||||
public static boolean randomizedClass = false;
|
||||
|
||||
private static final String GAME_FOLDER = "game%d";
|
||||
private static final String GAME_FILE = "game.dat";
|
||||
|
||||
@@ -69,6 +69,7 @@ public class Statistics {
|
||||
public static boolean completedWithNoKilling = false;
|
||||
public static boolean qualifiedForBossRemainsBadge = false;
|
||||
public static boolean qualifiedForBossChallengeBadge = false;
|
||||
public static boolean qualifiedForRandomVictoryBadge = false;
|
||||
|
||||
public static boolean amuletObtained = false;
|
||||
public static boolean gameWon = false;
|
||||
@@ -111,6 +112,7 @@ public class Statistics {
|
||||
qualifiedForNoKilling = false;
|
||||
qualifiedForBossRemainsBadge = false;
|
||||
qualifiedForBossChallengeBadge = false;
|
||||
qualifiedForRandomVictoryBadge = GamesInProgress.randomizedClass;
|
||||
|
||||
amuletObtained = false;
|
||||
gameWon = false;
|
||||
@@ -154,6 +156,7 @@ public class Statistics {
|
||||
private static final String NO_KILLING_QUALIFIED = "qualifiedForNoKilling";
|
||||
private static final String BOSS_REMAINS_QUALIFIED = "qualifiedForBossRemainsBadge";
|
||||
private static final String BOSS_CHALLENGE_QUALIFIED= "qualifiedForBossChallengeBadge";
|
||||
private static final String RANDOM_VICTORY_QUALIFIED= "qualifiedForRandomVictory";
|
||||
|
||||
private static final String AMULET = "amuletObtained";
|
||||
private static final String WON = "won";
|
||||
@@ -199,6 +202,7 @@ public class Statistics {
|
||||
bundle.put(NO_KILLING_QUALIFIED, qualifiedForNoKilling);
|
||||
bundle.put(BOSS_REMAINS_QUALIFIED, qualifiedForBossRemainsBadge);
|
||||
bundle.put(BOSS_CHALLENGE_QUALIFIED, qualifiedForBossChallengeBadge);
|
||||
bundle.put(RANDOM_VICTORY_QUALIFIED, qualifiedForRandomVictoryBadge);
|
||||
|
||||
bundle.put( AMULET, amuletObtained );
|
||||
bundle.put( WON, gameWon );
|
||||
@@ -259,6 +263,7 @@ public class Statistics {
|
||||
qualifiedForNoKilling = bundle.getBoolean( NO_KILLING_QUALIFIED );
|
||||
qualifiedForBossRemainsBadge = bundle.getBoolean( BOSS_REMAINS_QUALIFIED );
|
||||
qualifiedForBossChallengeBadge = bundle.getBoolean( BOSS_CHALLENGE_QUALIFIED );
|
||||
qualifiedForRandomVictoryBadge = bundle.getBoolean( RANDOM_VICTORY_QUALIFIED );
|
||||
|
||||
amuletObtained = bundle.getBoolean( AMULET );
|
||||
gameWon = bundle.getBoolean( WON );
|
||||
|
||||
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify;
|
||||
@@ -145,6 +146,7 @@ public class RatKing extends NPC {
|
||||
protected void onSelect(int index) {
|
||||
if (index == 0){
|
||||
crown.upgradeArmor(Dungeon.hero, Dungeon.hero.belongings.armor(), new Ratmogrify());
|
||||
Statistics.qualifiedForRandomVictoryBadge = false;
|
||||
((RatKingSprite)sprite).resetAnims();
|
||||
yell(Messages.get(RatKing.class, "crown_thankyou"));
|
||||
} else if (index == 1) {
|
||||
|
||||
@@ -410,6 +410,7 @@ public class HeroSelectScene extends PixelScene {
|
||||
|
||||
private void setSelectedHero(HeroClass cl){
|
||||
GamesInProgress.selectedClass = cl;
|
||||
GamesInProgress.randomizedClass = false;
|
||||
|
||||
try {
|
||||
//loading these big jpgs fails sometimes, so we have a catch for it
|
||||
@@ -827,7 +828,6 @@ public class HeroSelectScene extends PixelScene {
|
||||
|
||||
if (Badges.isUnlocked(Badges.Badge.VICTORY) || DeviceCompat.isDebug()){
|
||||
ShatteredPixelDungeon.scene().addToFront(new WndRandomize());
|
||||
//add window
|
||||
} else {
|
||||
|
||||
HeroClass randomCls;
|
||||
@@ -835,6 +835,7 @@ public class HeroSelectScene extends PixelScene {
|
||||
randomCls = Random.oneOf(HeroClass.values());
|
||||
} while (!randomCls.isUnlocked());
|
||||
setSelectedHero(randomCls);
|
||||
GamesInProgress.randomizedClass = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -908,6 +909,7 @@ public class HeroSelectScene extends PixelScene {
|
||||
randomCls = Random.oneOf(HeroClass.values());
|
||||
} while (!randomCls.isUnlocked());
|
||||
setSelectedHero(randomCls);
|
||||
GamesInProgress.randomizedClass = true;
|
||||
}
|
||||
|
||||
if (chkChals.checked()){
|
||||
|
||||
@@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfMetamorphosis;
|
||||
@@ -126,6 +127,7 @@ public class TalentButton extends Button {
|
||||
@Override
|
||||
public void call() {
|
||||
upgradeTalent();
|
||||
Statistics.qualifiedForRandomVictoryBadge = false;
|
||||
}
|
||||
});
|
||||
} else if (mode == Mode.METAMORPH_CHOOSE && Dungeon.hero != null && Dungeon.hero.isAlive()) {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.KingsCrown;
|
||||
@@ -115,6 +116,7 @@ public class WndChooseAbility extends Window {
|
||||
} else {
|
||||
new KingsCrown().upgradeArmor(hero, null, ability);
|
||||
}
|
||||
Statistics.qualifiedForRandomVictoryBadge = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.TengusMask;
|
||||
@@ -104,6 +105,7 @@ public class WndChooseSubclass extends Window {
|
||||
if (index == 0 && WndChooseSubclass.this.parent != null){
|
||||
WndChooseSubclass.this.hide();
|
||||
tome.choose( subCls );
|
||||
Statistics.qualifiedForRandomVictoryBadge = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user