v2.4.0: fixed some bugs in wondrous resin cursed wand effects
This commit is contained in:
+1
-1
@@ -197,7 +197,7 @@ public class ScrollOfMetamorphosis extends ExoticScroll {
|
|||||||
public WndMetamorphReplace(Talent replacing, int tier){
|
public WndMetamorphReplace(Talent replacing, int tier){
|
||||||
super();
|
super();
|
||||||
|
|
||||||
if (!identifiedByUse) {
|
if (!identifiedByUse && curItem instanceof ScrollOfMetamorphosis) {
|
||||||
curItem.detach(curUser.belongings.backpack);
|
curItem.detach(curUser.belongings.backpack);
|
||||||
}
|
}
|
||||||
identifiedByUse = false;
|
identifiedByUse = false;
|
||||||
|
|||||||
+8
-6
@@ -306,6 +306,7 @@ public class CursedWand {
|
|||||||
if (ch != null){
|
if (ch != null){
|
||||||
Buff.affect(ch, Hex.class, Hex.DURATION);
|
Buff.affect(ch, Hex.class, Hex.DURATION);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if (user instanceof Hero) {
|
if (user instanceof Hero) {
|
||||||
CursingTrap.curse( (Hero) user );
|
CursingTrap.curse( (Hero) user );
|
||||||
@@ -395,20 +396,21 @@ public class CursedWand {
|
|||||||
Mimic mimic = Mimic.spawnAt(spawnCell, GoldenMimic.class, false);
|
Mimic mimic = Mimic.spawnAt(spawnCell, GoldenMimic.class, false);
|
||||||
mimic.stopHiding();
|
mimic.stopHiding();
|
||||||
mimic.alignment = Char.Alignment.ENEMY;
|
mimic.alignment = Char.Alignment.ENEMY;
|
||||||
Item reward;
|
|
||||||
do {
|
|
||||||
reward = Generator.randomUsingDefaults(Random.oneOf(Generator.Category.WEAPON, Generator.Category.ARMOR,
|
|
||||||
Generator.Category.RING, Generator.Category.WAND));
|
|
||||||
} while (reward.level() < 1);
|
|
||||||
//play vfx/sfx manually as mimic isn't in the scene yet
|
//play vfx/sfx manually as mimic isn't in the scene yet
|
||||||
Sample.INSTANCE.play(Assets.Sounds.MIMIC, 1, 0.85f);
|
Sample.INSTANCE.play(Assets.Sounds.MIMIC, 1, 0.85f);
|
||||||
CellEmitter.get(mimic.pos).burst(Speck.factory(Speck.STAR), 10);
|
CellEmitter.get(mimic.pos).burst(Speck.factory(Speck.STAR), 10);
|
||||||
mimic.items.clear();
|
mimic.items.clear();
|
||||||
mimic.items.add(reward);
|
|
||||||
GameScene.add(mimic);
|
GameScene.add(mimic);
|
||||||
|
|
||||||
if (positiveOnly){
|
if (positiveOnly){
|
||||||
Buff.affect(mimic, ScrollOfSirensSong.Enthralled.class);
|
Buff.affect(mimic, ScrollOfSirensSong.Enthralled.class);
|
||||||
|
} else {
|
||||||
|
Item reward;
|
||||||
|
do {
|
||||||
|
reward = Generator.randomUsingDefaults(Random.oneOf(Generator.Category.WEAPON, Generator.Category.ARMOR,
|
||||||
|
Generator.Category.RING, Generator.Category.WAND));
|
||||||
|
} while (reward.level() < 1);
|
||||||
|
mimic.items.add(reward);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user