v0.9.3: added a hidden badge for ratmogrify

This commit is contained in:
Evan Debenham
2021-05-31 21:40:32 -04:00
parent 79627f465e
commit ccbc27fbda
2 changed files with 10 additions and 0 deletions
@@ -50,6 +50,7 @@ public class Badges {
MASTERY_MAGE,
MASTERY_ROGUE,
MASTERY_HUNTRESS,
FOUND_RATMOGRIFY,
//bronze
UNLOCK_MAGE ( 1 ),
@@ -699,6 +700,13 @@ public class Badges {
saveNeeded = true;
}
}
public static void validateRatmogrify(){
if (!global.contains( Badge.FOUND_RATMOGRIFY )) {
global.add( Badge.FOUND_RATMOGRIFY );
saveNeeded = true;
}
}
public static void validateMageUnlock(){
if (Statistics.upgradesUsed >= 1 && !global.contains(Badge.UNLOCK_MAGE)){
@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
@@ -119,6 +120,7 @@ public class RatKing extends NPC {
if (Dungeon.hero.belongings.armor == null){
yell( Messages.get(RatKing.class, "crown_clothes") );
} else {
Badges.validateRatmogrify();
Game.runOnRenderThread(new Callback() {
@Override
public void call() {