V0.1.0 partial commit
Implemented seed changes Changed Scroll of Challenge, now Scroll of Rage
This commit is contained in:
parent
33c27cdb58
commit
65dd9c2dc0
|
@ -2,7 +2,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.watabou.pixeldungeon"
|
||||
android:versionCode="59"
|
||||
android:versionName="1.7.1c"
|
||||
android:versionName="0.1.0 SH"
|
||||
android:installLocation="auto">
|
||||
|
||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||
|
|
|
@ -86,6 +86,7 @@ import com.watabou.pixeldungeon.levels.Terrain;
|
|||
import com.watabou.pixeldungeon.levels.features.AlchemyPot;
|
||||
import com.watabou.pixeldungeon.levels.features.Chasm;
|
||||
import com.watabou.pixeldungeon.plants.Earthroot;
|
||||
import com.watabou.pixeldungeon.plants.Sungrass;
|
||||
import com.watabou.pixeldungeon.scenes.GameScene;
|
||||
import com.watabou.pixeldungeon.scenes.InterlevelScene;
|
||||
import com.watabou.pixeldungeon.scenes.SurfaceScene;
|
||||
|
@ -805,6 +806,11 @@ public class Hero extends Char {
|
|||
damage = armor.absorb( damage );
|
||||
}
|
||||
|
||||
Sungrass.Health health = buff( Sungrass.Health.class );
|
||||
if (health != null) {
|
||||
health.absorb( damage );
|
||||
}
|
||||
|
||||
if (belongings.armor != null) {
|
||||
damage = belongings.armor.proc( enemy, this, damage );
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public class Generator {
|
|||
ScrollOfUpgrade.class,
|
||||
ScrollOfRecharging.class,
|
||||
ScrollOfMagicMapping.class,
|
||||
ScrollOfChallenge.class,
|
||||
ScrollOfRage.class,
|
||||
ScrollOfTerror.class,
|
||||
ScrollOfLullaby.class,
|
||||
ScrollOfWeaponUpgrade.class,
|
||||
|
|
|
@ -44,7 +44,7 @@ public abstract class Scroll extends Item {
|
|||
ScrollOfRemoveCurse.class,
|
||||
ScrollOfTeleportation.class,
|
||||
ScrollOfUpgrade.class,
|
||||
ScrollOfChallenge.class,
|
||||
ScrollOfRage.class,
|
||||
ScrollOfTerror.class,
|
||||
ScrollOfLullaby.class,
|
||||
ScrollOfWeaponUpgrade.class,
|
||||
|
|
|
@ -20,15 +20,17 @@ package com.watabou.pixeldungeon.items.scrolls;
|
|||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.pixeldungeon.Assets;
|
||||
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.mobs.Mob;
|
||||
import com.watabou.pixeldungeon.effects.Speck;
|
||||
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
|
||||
|
@ -36,9 +38,12 @@ public class ScrollOfChallenge extends Scroll {
|
|||
|
||||
for (Mob mob : Dungeon.level.mobs) {
|
||||
mob.beckon( curUser.pos );
|
||||
if (Dungeon.level.fieldOfView[mob.pos]) {
|
||||
Buff.prolong(mob, Amok.class, 5f);
|
||||
}
|
||||
}
|
||||
|
||||
GLog.w( "The scroll emits a challenging roar that echoes throughout the dungeon!" );
|
||||
GLog.w( "The scroll emits an enraging roar that echoes throughout the dungeon!" );
|
||||
setKnown();
|
||||
|
||||
curUser.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
|
||||
|
@ -51,7 +56,7 @@ public class ScrollOfChallenge extends Scroll {
|
|||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
"When read aloud, this scroll will unleash a challenging roar " +
|
||||
"that will awaken all monsters and alert them to the reader's location.";
|
||||
"When read aloud, this scroll will unleash a great roar " +
|
||||
"that draws all enemies to the reader, and enrages nearby ones.";
|
||||
}
|
||||
}
|
|
@ -20,6 +20,7 @@ package com.watabou.pixeldungeon.plants;
|
|||
import com.watabou.pixeldungeon.Dungeon;
|
||||
import com.watabou.pixeldungeon.actors.Char;
|
||||
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.mobs.Mob;
|
||||
import com.watabou.pixeldungeon.actors.mobs.Mob.State;
|
||||
|
@ -32,7 +33,8 @@ import com.watabou.utils.Random;
|
|||
public class Blindweed extends Plant {
|
||||
|
||||
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;
|
||||
|
@ -44,7 +46,9 @@ public class Blindweed extends Plant {
|
|||
super.activate( ch );
|
||||
|
||||
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) {
|
||||
((Mob)ch).state = State.WANDERING;
|
||||
((Mob)ch).beckon( Dungeon.level.randomDestination() );
|
||||
|
|
|
@ -26,13 +26,14 @@ import com.watabou.pixeldungeon.effects.particles.EarthParticle;
|
|||
import com.watabou.pixeldungeon.items.potions.PotionOfParalyticGas;
|
||||
import com.watabou.pixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.pixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.pixeldungeon.utils.Utils;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
public class Earthroot extends Plant {
|
||||
|
||||
private static final String TXT_DESC =
|
||||
"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;
|
||||
|
@ -49,7 +50,7 @@ public class Earthroot extends Plant {
|
|||
|
||||
if (Dungeon.visible[pos]) {
|
||||
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 ) {
|
||||
if (damage >= level) {
|
||||
if (damage*2 >= level) {
|
||||
detach();
|
||||
return damage - level;
|
||||
} else {
|
||||
level -= damage;
|
||||
return 0;
|
||||
level -= damage-damage/2;
|
||||
return damage/2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,7 +121,7 @@ public class Earthroot extends Plant {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Herbal armor";
|
||||
return Utils.format("Herbal armor (%d)", level);
|
||||
}
|
||||
|
||||
private static final String POS = "pos";
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.watabou.pixeldungeon.effects.particles.ShaftParticle;
|
|||
import com.watabou.pixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.watabou.pixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.pixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.pixeldungeon.utils.Utils;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
public class Sungrass extends Plant {
|
||||
|
@ -74,28 +75,51 @@ public class Sungrass extends Plant {
|
|||
|
||||
public static class Health extends Buff {
|
||||
|
||||
private static final float STEP = 5f;
|
||||
private static final float STEP = 1f;
|
||||
|
||||
private int pos;
|
||||
private int healCurr = 2;
|
||||
private int count = 5;
|
||||
private int healTot;
|
||||
|
||||
@Override
|
||||
public boolean attachTo( Char target ) {
|
||||
pos = target.pos;
|
||||
healTot = target.HT;
|
||||
return super.attachTo( target );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
if (target.pos != pos || target.HP >= target.HT) {
|
||||
if (target.pos != pos || healTot <= 0) {
|
||||
detach();
|
||||
}
|
||||
if (count == 5) {
|
||||
if (healTot <= healCurr) {
|
||||
target.HP = Math.min(target.HT, target.HP + healTot);
|
||||
target.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1);
|
||||
detach();
|
||||
} else {
|
||||
target.HP = Math.min( target.HT, target.HP + target.HT / 10 );
|
||||
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
|
||||
public int icon() {
|
||||
return BuffIndicator.HEALING;
|
||||
|
@ -103,7 +127,7 @@ public class Sungrass extends Plant {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Herbal healing";
|
||||
return Utils.format( "Herbal Healing (%d)", healTot);
|
||||
}
|
||||
|
||||
private static final String POS = "pos";
|
||||
|
|
Loading…
Reference in New Issue
Block a user