v0.7.0: stone of avoidance is now stone of affection
also adjusted charm logic. Charmed enemies will now try to find a new target Also removed some earlier beta conversion code also improved some brew and elixir sprites
This commit is contained in:
parent
a82c40e774
commit
e5701c4447
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
@ -27,7 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Electricity;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Electricity;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Adrenaline;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Adrenaline;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
|
@ -166,9 +165,6 @@ public abstract class Char extends Actor {
|
||||||
//attempt to find the buff that may have given the shield
|
//attempt to find the buff that may have given the shield
|
||||||
ShieldBuff buff = buff(Brimstone.BrimstoneShield.class);
|
ShieldBuff buff = buff(Brimstone.BrimstoneShield.class);
|
||||||
if (buff != null) legacySHLD -= buff.shielding();
|
if (buff != null) legacySHLD -= buff.shielding();
|
||||||
//pre beta-2.0, remove for full release
|
|
||||||
buff = buff(Barrier.class);
|
|
||||||
if (buff != null) legacySHLD -= buff.shielding();
|
|
||||||
if (legacySHLD > 0){
|
if (legacySHLD > 0){
|
||||||
BrokenSeal.WarriorShield buff2 = buff(BrokenSeal.WarriorShield.class);
|
BrokenSeal.WarriorShield buff2 = buff(BrokenSeal.WarriorShield.class);
|
||||||
if (buff != null) buff2.supercharge(legacySHLD);
|
if (buff != null) buff2.supercharge(legacySHLD);
|
||||||
|
|
|
@ -25,7 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
import com.watabou.utils.Bundle;
|
|
||||||
|
|
||||||
public class Barrier extends ShieldBuff {
|
public class Barrier extends ShieldBuff {
|
||||||
|
|
||||||
|
@ -59,15 +58,6 @@ public class Barrier extends ShieldBuff {
|
||||||
else target.sprite.remove(CharSprite.State.SHIELDED);
|
else target.sprite.remove(CharSprite.State.SHIELDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void restoreFromBundle( Bundle bundle ) {
|
|
||||||
super.restoreFromBundle( bundle );
|
|
||||||
if (bundle.contains("level")) {
|
|
||||||
//TODO pre beta-2.0, remove in full release
|
|
||||||
shielding = bundle.getInt("level");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int icon() {
|
public int icon() {
|
||||||
return BuffIndicator.ARMOR;
|
return BuffIndicator.ARMOR;
|
||||||
|
|
|
@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Adrenaline;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Adrenaline;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Charm;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Preparation;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Preparation;
|
||||||
|
@ -50,7 +51,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy;
|
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth;
|
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAvoidance;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
|
@ -213,9 +213,8 @@ public abstract class Mob extends Char {
|
||||||
//We are amoked and current enemy is the hero
|
//We are amoked and current enemy is the hero
|
||||||
else if (buff( Amok.class ) != null && enemy == Dungeon.hero)
|
else if (buff( Amok.class ) != null && enemy == Dungeon.hero)
|
||||||
newEnemy = true;
|
newEnemy = true;
|
||||||
//We have avoidance and current enemy is what should be avoided
|
//We are charmed and current enemy is what charmed us
|
||||||
else if (buff(StoneOfAvoidance.Avoidance.class) != null
|
else if (buff(Charm.class) != null && buff(Charm.class).object == enemy.id())
|
||||||
&& buff(StoneOfAvoidance.Avoidance.class).object == enemy.id())
|
|
||||||
newEnemy = true;
|
newEnemy = true;
|
||||||
|
|
||||||
if ( newEnemy ) {
|
if ( newEnemy ) {
|
||||||
|
@ -266,9 +265,9 @@ public abstract class Mob extends Char {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StoneOfAvoidance.Avoidance avoid = buff( StoneOfAvoidance.Avoidance.class );
|
Charm charm = buff( Charm.class );
|
||||||
if (avoid != null){
|
if (charm != null){
|
||||||
Char source = (Char)Actor.findById( avoid.object );
|
Char source = (Char)Actor.findById( charm.object );
|
||||||
if (source != null && enemies.contains(source) && enemies.size() > 1){
|
if (source != null && enemies.contains(source) && enemies.size() > 1){
|
||||||
enemies.remove(source);
|
enemies.remove(source);
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,9 +86,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.Runestone;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.Runestone;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAffection;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAugmentation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAugmentation;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAvoidance;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlast;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlast;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlink;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlink;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfClairvoyance;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfClairvoyance;
|
||||||
|
@ -282,7 +282,7 @@ public class Generator {
|
||||||
StoneOfAugmentation.class, //1 is sold in each shop
|
StoneOfAugmentation.class, //1 is sold in each shop
|
||||||
StoneOfIntuition.class, //1 additional stone is also dropped on floors 1-3
|
StoneOfIntuition.class, //1 additional stone is also dropped on floors 1-3
|
||||||
StoneOfAggression.class,
|
StoneOfAggression.class,
|
||||||
StoneOfAvoidance.class,
|
StoneOfAffection.class,
|
||||||
StoneOfBlast.class,
|
StoneOfBlast.class,
|
||||||
StoneOfBlink.class,
|
StoneOfBlink.class,
|
||||||
StoneOfClairvoyance.class,
|
StoneOfClairvoyance.class,
|
||||||
|
|
|
@ -32,9 +32,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Recipe;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.UnstableSpellbook;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.UnstableSpellbook;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfAntiMagic;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfAntiMagic;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.Runestone;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.Runestone;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAffection;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAugmentation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAugmentation;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAvoidance;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlast;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlast;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlink;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlink;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfClairvoyance;
|
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfClairvoyance;
|
||||||
|
@ -278,7 +278,7 @@ public abstract class Scroll extends Item {
|
||||||
stones.put(ScrollOfTeleportation.class, StoneOfBlink.class);
|
stones.put(ScrollOfTeleportation.class, StoneOfBlink.class);
|
||||||
amnts.put(ScrollOfTeleportation.class, 2);
|
amnts.put(ScrollOfTeleportation.class, 2);
|
||||||
|
|
||||||
stones.put(ScrollOfTerror.class, StoneOfAvoidance.class);
|
stones.put(ScrollOfTerror.class, StoneOfAffection.class);
|
||||||
amnts.put(ScrollOfTerror.class, 3);
|
amnts.put(ScrollOfTerror.class, 3);
|
||||||
|
|
||||||
stones.put(ScrollOfTransmutation.class, StoneOfAugmentation.class);
|
stones.put(ScrollOfTransmutation.class, StoneOfAugmentation.class);
|
||||||
|
|
|
@ -25,68 +25,34 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Charm;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Bundle;
|
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
|
|
||||||
public class StoneOfAvoidance extends Runestone {
|
public class StoneOfAffection extends Runestone {
|
||||||
|
|
||||||
{
|
{
|
||||||
image = ItemSpriteSheet.STONE_AVOIDANCE;
|
image = ItemSpriteSheet.STONE_AFFECTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void activate(int cell) {
|
protected void activate(int cell) {
|
||||||
|
|
||||||
CellEmitter.center(cell).start( Speck.factory( Speck.CALM ), 0.3f, 3 );
|
CellEmitter.center(cell).start( Speck.factory( Speck.HEART ), 0.2f, 5 );
|
||||||
Sample.INSTANCE.play( Assets.SND_READ );
|
Sample.INSTANCE.play( Assets.SND_CHARMS );
|
||||||
|
|
||||||
for (int i : PathFinder.NEIGHBOURS9){
|
for (int i : PathFinder.NEIGHBOURS9){
|
||||||
|
|
||||||
Char ch = Actor.findChar( cell + i );
|
Char ch = Actor.findChar( cell + i );
|
||||||
|
|
||||||
if (ch != null && ch.alignment == Char.Alignment.ENEMY){
|
if (ch != null && ch.alignment == Char.Alignment.ENEMY){
|
||||||
Buff.prolong(ch, Avoidance.class, Avoidance.DURATION).object = curUser.id();
|
Buff.prolong(ch, Charm.class, 10f).object = curUser.id();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Avoidance extends FlavourBuff {
|
|
||||||
|
|
||||||
public static final float DURATION = 10f;
|
|
||||||
|
|
||||||
public int object = 0;
|
|
||||||
|
|
||||||
private static final String OBJECT = "object";
|
|
||||||
|
|
||||||
{
|
|
||||||
type = buffType.NEGATIVE;
|
|
||||||
announced = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void storeInBundle( Bundle bundle ) {
|
|
||||||
super.storeInBundle(bundle);
|
|
||||||
bundle.put(OBJECT, object);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void restoreFromBundle( Bundle bundle ) {
|
|
||||||
super.restoreFromBundle( bundle );
|
|
||||||
object = bundle.getInt( OBJECT );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return Messages.get(this, "name");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -450,7 +450,7 @@ public class ItemSpriteSheet {
|
||||||
private static final int STONES = xy(1, 21); //16 slots
|
private static final int STONES = xy(1, 21); //16 slots
|
||||||
public static final int STONE_AGGRESSION = STONES+0;
|
public static final int STONE_AGGRESSION = STONES+0;
|
||||||
public static final int STONE_AUGMENTATION = STONES+1;
|
public static final int STONE_AUGMENTATION = STONES+1;
|
||||||
public static final int STONE_AVOIDANCE = STONES+2;
|
public static final int STONE_AFFECTION = STONES+2;
|
||||||
public static final int STONE_BLAST = STONES+3;
|
public static final int STONE_BLAST = STONES+3;
|
||||||
public static final int STONE_BLINK = STONES+4;
|
public static final int STONE_BLINK = STONES+4;
|
||||||
public static final int STONE_CLAIRVOYANCE = STONES+5;
|
public static final int STONE_CLAIRVOYANCE = STONES+5;
|
||||||
|
|
|
@ -980,9 +980,8 @@ items.stones.stoneofaugmentation$wndaugment.defense=Defense
|
||||||
items.stones.stoneofaugmentation$wndaugment.none=Remove Augmentation
|
items.stones.stoneofaugmentation$wndaugment.none=Remove Augmentation
|
||||||
items.stones.stoneofaugmentation$wndaugment.cancel=Never mind
|
items.stones.stoneofaugmentation$wndaugment.cancel=Never mind
|
||||||
|
|
||||||
items.stones.stoneofavoidance.name=stone of avoidance
|
items.stones.stoneofaffection.name=stone of affection
|
||||||
items.stones.stoneofavoidance.desc=When this stone is thrown near an enemy, it will afflict them with avoidance magic.\n\nAn enemy under the influence of avoidance will be forced to attack any of your allies instead of you, if any allies are nearby.
|
items.stones.stoneofaffection.desc=When this stone is thrown on an enemy, they will be temporarily charmed, and will attempt to target your allies instead of you.
|
||||||
items.stones.stoneofavoidance$avoidance.name=Avoidance
|
|
||||||
|
|
||||||
items.stones.stoneofblast.name=stone of blast
|
items.stones.stoneofblast.name=stone of blast
|
||||||
items.stones.stoneofblast.desc=This runestone will instantly explode at the location it is thrown to. Just like a bomb, the explosion will deal damage to anything nearby.
|
items.stones.stoneofblast.desc=This runestone will instantly explode at the location it is thrown to. Just like a bomb, the explosion will deal damage to anything nearby.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user