V0.1.0 partial commit

Implemented seed changes
Changed Scroll of Challenge, now Scroll of Rage
This commit is contained in:
Evan Debenham 2014-08-03 13:52:01 -04:00
parent 33c27cdb58
commit 65dd9c2dc0
8 changed files with 72 additions and 32 deletions

View File

@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.watabou.pixeldungeon" package="com.watabou.pixeldungeon"
android:versionCode="59" android:versionCode="59"
android:versionName="1.7.1c" android:versionName="0.1.0 SH"
android:installLocation="auto"> android:installLocation="auto">
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE"/>

View File

@ -86,6 +86,7 @@ import com.watabou.pixeldungeon.levels.Terrain;
import com.watabou.pixeldungeon.levels.features.AlchemyPot; import com.watabou.pixeldungeon.levels.features.AlchemyPot;
import com.watabou.pixeldungeon.levels.features.Chasm; import com.watabou.pixeldungeon.levels.features.Chasm;
import com.watabou.pixeldungeon.plants.Earthroot; import com.watabou.pixeldungeon.plants.Earthroot;
import com.watabou.pixeldungeon.plants.Sungrass;
import com.watabou.pixeldungeon.scenes.GameScene; import com.watabou.pixeldungeon.scenes.GameScene;
import com.watabou.pixeldungeon.scenes.InterlevelScene; import com.watabou.pixeldungeon.scenes.InterlevelScene;
import com.watabou.pixeldungeon.scenes.SurfaceScene; import com.watabou.pixeldungeon.scenes.SurfaceScene;
@ -804,6 +805,11 @@ public class Hero extends Char {
if (armor != null) { if (armor != null) {
damage = armor.absorb( damage ); damage = armor.absorb( damage );
} }
Sungrass.Health health = buff( Sungrass.Health.class );
if (health != null) {
health.absorb( damage );
}
if (belongings.armor != null) { if (belongings.armor != null) {
damage = belongings.armor.proc( enemy, this, damage ); damage = belongings.armor.proc( enemy, this, damage );

View File

@ -87,7 +87,7 @@ public class Generator {
ScrollOfUpgrade.class, ScrollOfUpgrade.class,
ScrollOfRecharging.class, ScrollOfRecharging.class,
ScrollOfMagicMapping.class, ScrollOfMagicMapping.class,
ScrollOfChallenge.class, ScrollOfRage.class,
ScrollOfTerror.class, ScrollOfTerror.class,
ScrollOfLullaby.class, ScrollOfLullaby.class,
ScrollOfWeaponUpgrade.class, ScrollOfWeaponUpgrade.class,

View File

@ -44,7 +44,7 @@ public abstract class Scroll extends Item {
ScrollOfRemoveCurse.class, ScrollOfRemoveCurse.class,
ScrollOfTeleportation.class, ScrollOfTeleportation.class,
ScrollOfUpgrade.class, ScrollOfUpgrade.class,
ScrollOfChallenge.class, ScrollOfRage.class,
ScrollOfTerror.class, ScrollOfTerror.class,
ScrollOfLullaby.class, ScrollOfLullaby.class,
ScrollOfWeaponUpgrade.class, ScrollOfWeaponUpgrade.class,

View File

@ -20,25 +20,30 @@ package com.watabou.pixeldungeon.items.scrolls;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.pixeldungeon.Assets; import com.watabou.pixeldungeon.Assets;
import com.watabou.pixeldungeon.Dungeon; import com.watabou.pixeldungeon.Dungeon;
import com.watabou.pixeldungeon.actors.buffs.Amok;
import com.watabou.pixeldungeon.actors.buffs.Buff;
import com.watabou.pixeldungeon.actors.buffs.Invisibility; import com.watabou.pixeldungeon.actors.buffs.Invisibility;
import com.watabou.pixeldungeon.actors.mobs.Mob; import com.watabou.pixeldungeon.actors.mobs.Mob;
import com.watabou.pixeldungeon.effects.Speck; import com.watabou.pixeldungeon.effects.Speck;
import com.watabou.pixeldungeon.utils.GLog; import com.watabou.pixeldungeon.utils.GLog;
public class ScrollOfChallenge extends Scroll { public class ScrollOfRage extends Scroll {
{ {
name = "Scroll of Challenge"; name = "Scroll of Rage";
} }
@Override @Override
protected void doRead() { protected void doRead() {
for (Mob mob : Dungeon.level.mobs) {
mob.beckon( curUser.pos );
if (Dungeon.level.fieldOfView[mob.pos]) {
Buff.prolong(mob, Amok.class, 5f);
}
}
for (Mob mob : Dungeon.level.mobs) { GLog.w( "The scroll emits an enraging roar that echoes throughout the dungeon!" );
mob.beckon( curUser.pos );
}
GLog.w( "The scroll emits a challenging roar that echoes throughout the dungeon!" );
setKnown(); setKnown();
curUser.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 ); curUser.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
@ -51,7 +56,7 @@ public class ScrollOfChallenge extends Scroll {
@Override @Override
public String desc() { public String desc() {
return return
"When read aloud, this scroll will unleash a challenging roar " + "When read aloud, this scroll will unleash a great roar " +
"that will awaken all monsters and alert them to the reader's location."; "that draws all enemies to the reader, and enrages nearby ones.";
} }
} }

View File

@ -20,6 +20,7 @@ package com.watabou.pixeldungeon.plants;
import com.watabou.pixeldungeon.Dungeon; import com.watabou.pixeldungeon.Dungeon;
import com.watabou.pixeldungeon.actors.Char; import com.watabou.pixeldungeon.actors.Char;
import com.watabou.pixeldungeon.actors.buffs.Blindness; import com.watabou.pixeldungeon.actors.buffs.Blindness;
import com.watabou.pixeldungeon.actors.buffs.Cripple;
import com.watabou.pixeldungeon.actors.buffs.Buff; import com.watabou.pixeldungeon.actors.buffs.Buff;
import com.watabou.pixeldungeon.actors.mobs.Mob; import com.watabou.pixeldungeon.actors.mobs.Mob;
import com.watabou.pixeldungeon.actors.mobs.Mob.State; import com.watabou.pixeldungeon.actors.mobs.Mob.State;
@ -32,7 +33,8 @@ import com.watabou.utils.Random;
public class Blindweed extends Plant { public class Blindweed extends Plant {
private static final String TXT_DESC = private static final String TXT_DESC =
"Upon touching a Blindweed it perishes in a blinding flash of light."; "Upon being touched a Blindweed perishes in a bright flash of light." +
"The flash is strong enough to disorient for several seconds.";
{ {
image = 3; image = 3;
@ -44,7 +46,9 @@ public class Blindweed extends Plant {
super.activate( ch ); super.activate( ch );
if (ch != null) { if (ch != null) {
Buff.prolong( ch, Blindness.class, Random.Int( 5, 10 ) ); int len = Random.Int( 5, 10 );
Buff.prolong( ch, Blindness.class, len );
Buff.prolong( ch, Cripple.class, len );
if (ch instanceof Mob) { if (ch instanceof Mob) {
((Mob)ch).state = State.WANDERING; ((Mob)ch).state = State.WANDERING;
((Mob)ch).beckon( Dungeon.level.randomDestination() ); ((Mob)ch).beckon( Dungeon.level.randomDestination() );

View File

@ -26,13 +26,14 @@ import com.watabou.pixeldungeon.effects.particles.EarthParticle;
import com.watabou.pixeldungeon.items.potions.PotionOfParalyticGas; import com.watabou.pixeldungeon.items.potions.PotionOfParalyticGas;
import com.watabou.pixeldungeon.sprites.ItemSpriteSheet; import com.watabou.pixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.pixeldungeon.ui.BuffIndicator; import com.watabou.pixeldungeon.ui.BuffIndicator;
import com.watabou.pixeldungeon.utils.Utils;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
public class Earthroot extends Plant { public class Earthroot extends Plant {
private static final String TXT_DESC = private static final String TXT_DESC =
"When a creature touches an Earthroot, its roots " + "When a creature touches an Earthroot, its roots " +
"create a kind of natural armor around it."; "create a kind of immobile natural armor around it.";
{ {
image = 5; image = 5;
@ -49,7 +50,7 @@ public class Earthroot extends Plant {
if (Dungeon.visible[pos]) { if (Dungeon.visible[pos]) {
CellEmitter.bottom( pos ).start( EarthParticle.FACTORY, 0.05f, 8 ); CellEmitter.bottom( pos ).start( EarthParticle.FACTORY, 0.05f, 8 );
Camera.main.shake( 1, 0.4f ); Camera.main.shake( 0.25f, 1f );
} }
} }
@ -98,12 +99,12 @@ public class Earthroot extends Plant {
} }
public int absorb( int damage ) { public int absorb( int damage ) {
if (damage >= level) { if (damage*2 >= level) {
detach(); detach();
return damage - level; return damage - level;
} else { } else {
level -= damage; level -= damage-damage/2;
return 0; return damage/2;
} }
} }
@ -120,7 +121,7 @@ public class Earthroot extends Plant {
@Override @Override
public String toString() { public String toString() {
return "Herbal armor"; return Utils.format("Herbal armor (%d)", level);
} }
private static final String POS = "pos"; private static final String POS = "pos";

View File

@ -26,6 +26,7 @@ import com.watabou.pixeldungeon.effects.particles.ShaftParticle;
import com.watabou.pixeldungeon.items.potions.PotionOfHealing; import com.watabou.pixeldungeon.items.potions.PotionOfHealing;
import com.watabou.pixeldungeon.sprites.ItemSpriteSheet; import com.watabou.pixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.pixeldungeon.ui.BuffIndicator; import com.watabou.pixeldungeon.ui.BuffIndicator;
import com.watabou.pixeldungeon.utils.Utils;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
public class Sungrass extends Plant { public class Sungrass extends Plant {
@ -74,27 +75,50 @@ public class Sungrass extends Plant {
public static class Health extends Buff { public static class Health extends Buff {
private static final float STEP = 5f; private static final float STEP = 1f;
private int pos; private int pos;
private int healCurr = 2;
private int count = 5;
private int healTot;
@Override @Override
public boolean attachTo( Char target ) { public boolean attachTo( Char target ) {
pos = target.pos; pos = target.pos;
healTot = target.HT;
return super.attachTo( target ); return super.attachTo( target );
} }
@Override @Override
public boolean act() { public boolean act() {
if (target.pos != pos || target.HP >= target.HT) { if (target.pos != pos || healTot <= 0) {
detach(); detach();
} else { }
target.HP = Math.min( target.HT, target.HP + target.HT / 10 ); if (count == 5) {
target.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 ); if (healTot <= healCurr) {
} target.HP = Math.min(target.HT, target.HP + healTot);
spend( STEP ); target.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1);
return true; detach();
} } else {
target.HP = Math.min(target.HT, target.HP + healCurr);
healTot -= healCurr;
healCurr = Math.min(healCurr+healCurr-1,(int)(target.HT*0.15));
target.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1);
}
count = 1;
} else {
count++;
}
spend( STEP );
return true;
}
public int absorb( int damage ) {
healTot -= damage;
if (healTot <= 0)
detach();
return damage;
}
@Override @Override
public int icon() { public int icon() {
@ -103,7 +127,7 @@ public class Sungrass extends Plant {
@Override @Override
public String toString() { public String toString() {
return "Herbal healing"; return Utils.format( "Herbal Healing (%d)", healTot);
} }
private static final String POS = "pos"; private static final String POS = "pos";