V0.2.0: Implemented Ring of Might
This commit is contained in:
parent
cbb7d8b130
commit
902b2a096f
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user