Merging 1.7.5 Source: actors/blobs changes

This commit is contained in:
Evan Debenham 2015-01-30 16:08:23 -05:00
parent c467cb966c
commit d50c566579
2 changed files with 26 additions and 41 deletions

View File

@ -30,9 +30,8 @@ import com.watabou.utils.Random;
public class Freezing { public class Freezing {
// It's not really a blob... // Returns true, if this cell is visible
public static boolean affect( int cell, Fire fire ) {
public static void affect( int cell, Fire fire ) {
Char ch = Actor.findChar( cell ); Char ch = Actor.findChar( cell );
if (ch != null) { if (ch != null) {
@ -54,8 +53,9 @@ public class Freezing {
if (Dungeon.visible[cell]) { if (Dungeon.visible[cell]) {
CellEmitter.get( cell ).start( SnowParticle.FACTORY, 0.2f, 6 ); CellEmitter.get( cell ).start( SnowParticle.FACTORY, 0.2f, 6 );
return true;
} else {
return false;
} }
} }
} }

View File

@ -33,7 +33,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfWeaponUpgrade; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfWeaponUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon.Enchantment;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.*; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.*;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
@ -43,41 +42,29 @@ public class WaterOfTransmutation extends WellWater {
protected Item affectItem( Item item ) { protected Item affectItem( Item item ) {
if (item instanceof MeleeWeapon) { if (item instanceof MeleeWeapon) {
item = changeWeapon( (MeleeWeapon)item );
return changeWeapon( (MeleeWeapon)item );
} else if (item instanceof Scroll) { } else if (item instanceof Scroll) {
item = changeScroll( (Scroll)item );
Journal.remove( Feature.WELL_OF_TRANSMUTATION );
return changeScroll( (Scroll)item );
} else if (item instanceof Potion) { } else if (item instanceof Potion) {
item = changePotion( (Potion)item );
Journal.remove( Feature.WELL_OF_TRANSMUTATION );
return changePotion( (Potion)item );
} else if (item instanceof Ring) { } else if (item instanceof Ring) {
item = changeRing( (Ring)item );
Journal.remove( Feature.WELL_OF_TRANSMUTATION ); } else if (item instanceof Wand) {
return changeRing( (Ring)item ); item = changeWand( (Wand)item );
} else if (item instanceof Wand) {
Journal.remove( Feature.WELL_OF_TRANSMUTATION );
return changeWand( (Wand)item );
} else if (item instanceof Plant.Seed) { } else if (item instanceof Plant.Seed) {
item = changeSeed( (Plant.Seed)item );
Journal.remove( Feature.WELL_OF_TRANSMUTATION );
return changeSeed( (Plant.Seed)item );
} else if (item instanceof Artifact) { } else if (item instanceof Artifact) {
item = changeArtifact( (Artifact)item );
return changeArtifact( (Artifact)item );
} else { } else {
return null; item = null;
} }
if (item != null) {
Journal.remove( Feature.WELL_OF_TRANSMUTATION );
}
return item;
} }
@Override @Override
@ -128,17 +115,16 @@ public class WaterOfTransmutation extends WellWater {
} else if (level < 0) { } else if (level < 0) {
n.degrade( -level ); n.degrade( -level );
} }
if (w.isEnchanted()) { //FIXME enchantment should be preserved.
n.enchant( Enchantment.random() ); /*if (w.isEnchanted()) {
} n.enchant();
}*/
n.levelKnown = w.levelKnown; n.levelKnown = w.levelKnown;
n.cursedKnown = w.cursedKnown; n.cursedKnown = w.cursedKnown;
n.cursed = w.cursed; n.cursed = w.cursed;
Journal.remove( Feature.WELL_OF_TRANSMUTATION );
return n; return n;
} else { } else {
return null; return null;
@ -175,7 +161,6 @@ public class WaterOfTransmutation extends WellWater {
n.cursed = a.cursed; n.cursed = a.cursed;
n.levelKnown = a.levelKnown; n.levelKnown = a.levelKnown;
n.transferUpgrade(a.visiblyUpgraded()); n.transferUpgrade(a.visiblyUpgraded());
Journal.remove( Feature.WELL_OF_TRANSMUTATION );
} }
return n; return n;