diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java index d125544c6..3f5198c9f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java @@ -1,10 +1,14 @@ package com.shatteredpixel.shatteredpixeldungeon.items.rings; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; + /** * Created by debenhame on 10/09/2014. */ public class RingOfMight extends Ring { - //TODO: tie this into game logic + //TODO: test this, numbers tweaking + //specifically, make sure this works with levelling up the ring { name = "Ring of Might"; } @@ -24,6 +28,28 @@ public class RingOfMight extends Ring { } public class Might extends RingBuff { + + @Override + public boolean attachTo( Char target ) { + + if (target instanceof Hero){ + ((Hero) target).STR += level; + } + if (level > 0){ + target.HT += level*5; + } + return super.attachTo(target); + } + + @Override + public void detach(){ + if (target instanceof Hero){ + ((Hero) target).STR -= level; + } + if (level > 0){ + target.HT -= level*5; + } + } } }