Merging 1.7.5 Source: actors/buffs changes

This commit is contained in:
Evan Debenham
2015-01-30 17:16:05 -05:00
parent d50c566579
commit 9e79aab869
8 changed files with 82 additions and 38 deletions
@@ -20,25 +20,26 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements.Resistance;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.utils.Bundle;
public class Charm extends FlavourBuff {
public int object = 0;
private static final String OBJECT = "object";
@Override
public boolean attachTo( Char target ) {
if (super.attachTo( target )) {
target.pacified = true;
return true;
} else {
return false;
}
public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle );
bundle.put( OBJECT, object );
}
@Override
public void detach() {
target.pacified = false;
super.detach();
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle( bundle );
object = bundle.getInt( OBJECT );
}
@Override
public int icon() {
return BuffIndicator.HEART;