@Override public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) { // lvl 0 - 10% // lvl 1 - 18% // lvl 2 - 25% if (Random.Int( level() + 10 ) >= 9){ //grants a free use of the staff freeCharge = true; GLog.p( Messages.get(this, "charged") ); attacker.sprite.emitter().burst(BloodParticle.BURST, 20); } }
@Override public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) { // lvl 0 - 10% // lvl 1 - 18% // lvl 2 - 25% if (Random.Int( level() + 10 ) >= 9){ //grants a free use of the staff freeCharge = true; GLog.p( Messages.get(this, "charged") ); attacker.sprite.emitter().burst(BloodParticle.BURST, 20); } }
int healing = selfDmg + 3*level(); int shielding = (ch.HP + healing) - ch.HT; if (shielding > 0){ ch.sprite.emitter().burst(Speck.factory(Speck.HEALING), 2 + level() / 2); ch.sprite.showStatus(CharSprite.POSITIVE, "+%dHP", healing + shielding); int damage = selfDmg + 3*level(); ch.damage(damage, this); ch.sprite.emitter().start(ShadowParticle.UP, 0.05f, 10 + level()); Sample.INSTANCE.play(Assets.SND_BURNING); Buff.affect(ch , Charm.class, 4 + level() ).object = curUser.id();
int healing = selfDmg + 3*level(); int shielding = (ch.HP + healing) - ch.HT; if (shielding > 0){ ch.sprite.emitter().burst(Speck.factory(Speck.HEALING), 2 + level() / 2); ch.sprite.showStatus(CharSprite.POSITIVE, "+%dHP", healing + shielding); int damage = selfDmg + 3*level(); ch.damage(damage, this); ch.sprite.emitter().start(ShadowParticle.UP, 0.05f, 10 + level()); Sample.INSTANCE.play(Assets.SND_BURNING); Buff.affect(ch , Charm.class, 4 + level() ).object = curUser.id();