V0.2.0: Tied Ring of Force into game logic.
This commit is contained in:
parent
32505de1ac
commit
c4c6372d2a
|
@ -23,6 +23,7 @@ import java.util.HashSet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CapeOfThorns;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CapeOfThorns;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfForce;
|
||||||
import com.watabou.noosa.Camera;
|
import com.watabou.noosa.Camera;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
@ -306,10 +307,16 @@ public class Hero extends Char {
|
||||||
@Override
|
@Override
|
||||||
public int damageRoll() {
|
public int damageRoll() {
|
||||||
int dmg;
|
int dmg;
|
||||||
|
int bonus = 0;
|
||||||
|
for (Buff buff : buffs( RingOfEvasion.Evasion.class )) {
|
||||||
|
bonus += ((RingOfForce.Force)buff).level;
|
||||||
|
}
|
||||||
|
|
||||||
if (belongings.weapon != null) {
|
if (belongings.weapon != null) {
|
||||||
dmg = belongings.weapon.damageRoll( this );
|
dmg = belongings.weapon.damageRoll( this ) + bonus;
|
||||||
} else {
|
} else {
|
||||||
dmg = STR() > 10 ? Random.IntRange( 1, STR() - 9 ) : 1;
|
bonus *= 1+Math.round(lvl/5f);
|
||||||
|
dmg = Random.NormalIntRange( 1, Math.min(1 , STR()-9+bonus ) );
|
||||||
}
|
}
|
||||||
return buff( Fury.class ) != null ? (int)(dmg * 1.5f) : dmg;
|
return buff( Fury.class ) != null ? (int)(dmg * 1.5f) : dmg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.rings;
|
||||||
* Created by debenhame on 10/09/2014.
|
* Created by debenhame on 10/09/2014.
|
||||||
*/
|
*/
|
||||||
public class RingOfForce extends Ring {
|
public class RingOfForce extends Ring {
|
||||||
//TODO: tie this into game logic
|
//TODO: testing, numbers tweaking
|
||||||
{
|
{
|
||||||
name = "Ring of Force";
|
name = "Ring of Force";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user