v0.9.1: added an icon and description to the pincushion buff

This commit is contained in:
Evan Debenham 2020-10-20 17:30:39 -04:00
parent 92b0b69ac7
commit 51fd143a6e
5 changed files with 26 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -238,6 +238,9 @@ actors.buffs.paralysis.heromsg=You are paralysed!
actors.buffs.paralysis.out=resisted paralysis
actors.buffs.paralysis.desc=Oftentimes the worst thing to do is nothing at all.\n\nParalysis completely halts all actions, forcing the target to wait until the effect wears off. The pain from taking damage can cause characters to resist paralysis, breaking them out of the effect.\n\nTurns of paralysis remaining: %s.
actors.buffs.pincushion.name=Pincushion
actors.buffs.pincushion.desc=The thrown weapons you have used against this character are currently stuck to them and will fall to the floor after they are defeated.\n\nThe following items are currently attached:
actors.buffs.poison.name=Poisoned
actors.buffs.poison.heromsg=You are poisoned!
actors.buffs.poison.ondeath=You died from poison...

View File

@ -24,6 +24,8 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.utils.Bundle;
import java.util.ArrayList;
@ -63,4 +65,24 @@ public class PinCushion extends Buff {
items = new ArrayList<>((Collection<MissileWeapon>) ((Collection<?>) bundle.getCollection(ITEMS)));
super.restoreFromBundle( bundle );
}
@Override
public int icon() {
return BuffIndicator.PINCUSHION;
}
@Override
public String toString() {
return Messages.get(this, "name");
}
@Override
public String desc() {
String desc = Messages.get(this, "desc");
for (Item i : items){
desc += "\n" + i.toString();
}
return desc;
}
}

View File

@ -94,6 +94,7 @@ public class BuffIndicator extends Component {
public static final int VULNERABLE = 46;
public static final int HEX = 47;
public static final int DEGRADE = 48;
public static final int PINCUSHION = 49;
public static final int SIZE = 7;