v0.3.2: tome of mastery is no longer given at level 1 once unlocked
This commit is contained in:
@@ -25,7 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.TomeOfMastery;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Food;
|
import com.shatteredpixel.shatteredpixeldungeon.items.food.Food;
|
||||||
@@ -33,7 +32,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfMagicMissile;
|
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfMagicMissile;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dagger;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dagger;
|
||||||
@@ -110,10 +108,6 @@ public enum HeroClass {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Badges.isUnlocked( masteryBadge() )) {
|
|
||||||
new TomeOfMastery().collect();
|
|
||||||
}
|
|
||||||
|
|
||||||
hero.updateAwareness();
|
hero.updateAwareness();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
|||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.PoisonTrap;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.PoisonTrap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
|
||||||
@@ -83,22 +84,7 @@ public class Tengu extends Mob {
|
|||||||
@Override
|
@Override
|
||||||
public void die( Object cause ) {
|
public void die( Object cause ) {
|
||||||
|
|
||||||
Badges.Badge badgeToCheck = null;
|
if (Dungeon.hero.subClass == HeroSubClass.NONE) {
|
||||||
switch (Dungeon.hero.heroClass) {
|
|
||||||
case WARRIOR:
|
|
||||||
badgeToCheck = Badge.MASTERY_WARRIOR;
|
|
||||||
break;
|
|
||||||
case MAGE:
|
|
||||||
badgeToCheck = Badge.MASTERY_MAGE;
|
|
||||||
break;
|
|
||||||
case ROGUE:
|
|
||||||
badgeToCheck = Badge.MASTERY_ROGUE;
|
|
||||||
break;
|
|
||||||
case HUNTRESS:
|
|
||||||
badgeToCheck = Badge.MASTERY_HUNTRESS;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!Badges.isUnlocked( badgeToCheck )) {
|
|
||||||
Dungeon.level.drop( new TomeOfMastery(), pos ).sprite.drop();
|
Dungeon.level.drop( new TomeOfMastery(), pos ).sprite.drop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user