@Override public boolean attachTo(Char target) { if (Dungeon.level != null) for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) mob.sprite.add(CharSprite.State.PARALYSED); GameScene.freezeEmitters = true; return super.attachTo(target); }
@Override public void detach(){ for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) mob.sprite.remove(CharSprite.State.PARALYSED); GameScene.freezeEmitters = false; updateQuickslot(); super.detach(); activeBuff = null; triggerPresses(); target.next(); }
@Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); int[] values = bundle.getIntArray( PRESSES ); for (int value : values) presses.add(value); partialTime = bundle.getFloat( PARTIALTIME ); } }
@Override public boolean attachTo(Char target) { if (super.attachTo(target)) { int usedCharge = Math.min(charge, 2); //buffs always act last, so the stasis buff should end a turn early. spend((5*usedCharge) - 1); ((Hero) target).spendAndNext(5*usedCharge); //shouldn't punish the player for going into stasis frequently Hunger hunger = target.buff(Hunger.class); if (hunger != null && !hunger.isStarving()) hunger.satisfy(5*usedCharge); charge -= usedCharge; target.invisible++; updateQuickslot(); Dungeon.observe(); return true; } else { return false; } }
@Override public boolean attachTo(Char target) { if (super.attachTo(target)) { int usedCharge = Math.min(charge, 2); //buffs always act last, so the stasis buff should end a turn early. spend((5*usedCharge) - 1); ((Hero) target).spendAndNext(5*usedCharge); //shouldn't punish the player for going into stasis frequently Hunger hunger = target.buff(Hunger.class); if (hunger != null && !hunger.isStarving()) hunger.satisfy(5*usedCharge); charge -= usedCharge; target.invisible++; updateQuickslot(); Dungeon.observe(); return true; } else { return false; } }
@Override public void detach(){ cooldown = 0; charge = 0; super.detach(); }
@Override public void detach() { if (target.invisible > 0) target.invisible--; stealthed = false; updateQuickslot(); super.detach(); } }
@Override public boolean attachTo( Char target ) { if (super.attachTo( target )) { target.invisible++; if (target instanceof Hero && ((Hero) target).subClass == HeroSubClass.ASSASSIN){ Buff.affect(target, Preparation.class); } return true; } else { return false; } }
@Override public void detach() { if (target.invisible > 0) target.invisible --; super.detach(); activeBuff = null; Dungeon.observe(); } }
@Override public void detach() { if (target.invisible > 0) target.invisible--; stealthed = false; updateQuickslot(); super.detach(); } }
@Override public void detach(){ cooldown = 0; charge = 0; super.detach(); }
@Override public boolean act() { if (cursed) { if (Dungeon.gold > 0 && Random.Int(6) == 0){ Dungeon.gold--; } spend(TICK); return true; } else { return super.act(); } }
@Override public void storeInBundle(Bundle bundle) { super.storeInBundle(bundle); int[] values = new int[presses.size()]; for (int i = 0; i < values.length; i ++) values[i] = presses.get(i); bundle.put( PRESSES , values ); bundle.put( PARTIALTIME , partialTime ); }
public void satisfy( float energy ) { Artifact.ArtifactBuff buff = target.buff( HornOfPlenty.hornRecharge.class ); if (buff != null && buff.isCursed()){ energy *= 0.67f; GLog.n( Messages.get(this, "cursedhorn") ); } reduceHunger( energy ); }
@Override public void detach() { charge *= 0.95; super.detach(); }
@Override public void detach() { if (target.invisible > 0) target.invisible --; super.detach(); activeBuff = null; Dungeon.observe(); } }
@Override public boolean act() { if (cursed) { if (Dungeon.gold > 0 && Random.Int(6) == 0){ Dungeon.gold--; } spend(TICK); return true; } else { return super.act(); } }
@Override public void storeInBundle(Bundle bundle) { super.storeInBundle(bundle); int[] values = new int[presses.size()]; for (int i = 0; i < values.length; i ++) values[i] = presses.get(i); bundle.put( PRESSES , values ); bundle.put( PARTIALTIME , partialTime ); }
@Override public boolean attachTo( Char target ) { if (super.attachTo( target )) { target.invisible++; if (target instanceof Hero && ((Hero) target).subClass == HeroSubClass.ASSASSIN){ Buff.affect(target, Preparation.class); } return true; } else { return false; } }
@Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); int[] values = bundle.getIntArray( PRESSES ); for (int value : values) presses.add(value); partialTime = bundle.getFloat( PARTIALTIME ); } }