v0.7.0: added a tipped dart for swiftthistle
This commit is contained in:
@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
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.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;
|
||||||
@@ -280,6 +281,7 @@ public abstract class Char extends Actor {
|
|||||||
public float speed() {
|
public float speed() {
|
||||||
float speed = baseSpeed;
|
float speed = baseSpeed;
|
||||||
if ( buff( Cripple.class ) != null ) speed /= 2f;
|
if ( buff( Cripple.class ) != null ) speed /= 2f;
|
||||||
|
if ( buff( Adrenaline.class ) != null) speed *= 2f;
|
||||||
if ( buff( Haste.class ) != null) speed *= 3f;
|
if ( buff( Haste.class ) != null) speed *= 3f;
|
||||||
return speed;
|
return speed;
|
||||||
}
|
}
|
||||||
|
|||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Pixel Dungeon
|
||||||
|
* Copyright (C) 2012-2015 Oleg Dolya
|
||||||
|
*
|
||||||
|
* Shattered Pixel Dungeon
|
||||||
|
* Copyright (C) 2014-2018 Evan Debenham
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
|
import com.watabou.noosa.Image;
|
||||||
|
|
||||||
|
public class Adrenaline extends FlavourBuff {
|
||||||
|
|
||||||
|
public static final float DURATION = 10f;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int icon() {
|
||||||
|
//TODO
|
||||||
|
return BuffIndicator.IMMUNITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tintIcon(Image icon) {
|
||||||
|
greyIcon(icon, 5f, cooldown());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return Messages.get(this, "name");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String desc() {
|
||||||
|
return Messages.get(this, "desc", dispTurns());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -55,7 +55,7 @@ public class Golem extends Mob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected float attackDelay() {
|
protected float attackDelay() {
|
||||||
return 1.5f;
|
return super.attackDelay() * 1.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||||
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.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.Corruption;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
|
||||||
@@ -452,7 +453,9 @@ public abstract class Mob extends Char {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected float attackDelay() {
|
protected float attackDelay() {
|
||||||
return 1f;
|
float delay = 1f;
|
||||||
|
if ( buff(Adrenaline.class) != null) delay /= 1.5f;
|
||||||
|
return delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean doAttack( Char enemy ) {
|
protected boolean doAttack( Char enemy ) {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class Monk extends Mob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected float attackDelay() {
|
protected float attackDelay() {
|
||||||
return 0.5f;
|
return super.attackDelay()*0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class Statue extends Mob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected float attackDelay() {
|
protected float attackDelay() {
|
||||||
return weapon.speedFactor( this );
|
return super.attackDelay()*weapon.speedFactor( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public class Thief extends Mob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected float attackDelay() {
|
protected float attackDelay() {
|
||||||
return 0.5f;
|
return super.attackDelay()*0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+3
-3
@@ -487,11 +487,11 @@ public class DriedRose extends Artifact {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected float attackDelay() {
|
protected float attackDelay() {
|
||||||
|
float delay = super.attackDelay();
|
||||||
if (rose != null && rose.weapon != null){
|
if (rose != null && rose.weapon != null){
|
||||||
return rose.weapon.speedFactor(this);
|
delay *= rose.weapon.speedFactor(this);
|
||||||
} else {
|
|
||||||
return super.attackDelay();
|
|
||||||
}
|
}
|
||||||
|
return delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Pixel Dungeon
|
||||||
|
* Copyright (C) 2012-2015 Oleg Dolya
|
||||||
|
*
|
||||||
|
* Shattered Pixel Dungeon
|
||||||
|
* Copyright (C) 2014-2018 Evan Debenham
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Adrenaline;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
|
||||||
|
public class AdrenalineDart extends TippedDart {
|
||||||
|
|
||||||
|
{
|
||||||
|
//TODO
|
||||||
|
image = ItemSpriteSheet.BLINDING_DART;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int proc(Char attacker, Char defender, int damage) {
|
||||||
|
|
||||||
|
Buff.prolong( defender, Adrenaline.class, Adrenaline.DURATION);
|
||||||
|
|
||||||
|
if (attacker.alignment == defender.alignment){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.proc(attacker, defender, damage);
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
@@ -41,6 +41,7 @@ import com.shatteredpixel.shatteredpixeldungeon.plants.Sorrowmoss;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Starflower;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Starflower;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Stormvine;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Stormvine;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Sungrass;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Sungrass;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -82,6 +83,7 @@ public abstract class TippedDart extends Dart {
|
|||||||
types.put(Starflower.Seed.class, HolyDart.class);
|
types.put(Starflower.Seed.class, HolyDart.class);
|
||||||
types.put(Stormvine.Seed.class, ShockingDart.class);
|
types.put(Stormvine.Seed.class, ShockingDart.class);
|
||||||
types.put(Sungrass.Seed.class, HealingDart.class);
|
types.put(Sungrass.Seed.class, HealingDart.class);
|
||||||
|
types.put(Swiftthistle.Seed.class, AdrenalineDart.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TippedDart randomTipped(){
|
public static TippedDart randomTipped(){
|
||||||
|
|||||||
+3
@@ -35,6 +35,9 @@ actors.blobs.web.desc=Everything is covered with a thick web here.
|
|||||||
|
|
||||||
|
|
||||||
###buffs
|
###buffs
|
||||||
|
actors.buffs.adrenaline.name=Adrenaline
|
||||||
|
actors.buffs.adrenaline.desc=A surge of physical power, adrenaline enhanced both attack and movement speed.\n\nAdrenaline allows its target to run at 2x speed, and attack at 1.5x speed.\n\nTurns remaining: %s.
|
||||||
|
|
||||||
actors.buffs.amok.name=Amok
|
actors.buffs.amok.name=Amok
|
||||||
actors.buffs.amok.desc=Amok causes a state of great rage and confusion in its target.\n\nWhen a creature is amoked, they will attack whatever is near them, whether they be friend or foe.\n\nTurns of amok remaining: %s.
|
actors.buffs.amok.desc=Amok causes a state of great rage and confusion in its target.\n\nWhen a creature is amoked, they will attack whatever is near them, whether they be friend or foe.\n\nTurns of amok remaining: %s.
|
||||||
|
|
||||||
|
|||||||
+3
@@ -1009,6 +1009,9 @@ items.weapon.melee.wornshortsword.desc=A quite short sword, worn down through he
|
|||||||
|
|
||||||
|
|
||||||
###missile weapons
|
###missile weapons
|
||||||
|
items.weapon.missiles.darts.adrenalinedart.name=adrenaline dart
|
||||||
|
items.weapon.missiles.darts.adrenalinedart.desc=These darts are tipped with a swiftthistle-based compound which will give their target a boost in speed. This boost affects both speed of movement and of attacking, though movement is improved more.
|
||||||
|
|
||||||
items.weapon.missiles.darts.blindingdart.name=blinding dart
|
items.weapon.missiles.darts.blindingdart.name=blinding dart
|
||||||
items.weapon.missiles.darts.blindingdart.desc=These darts are tipped with a blindweed-based compound which will blind their target for a short time. They do not disorient however, so an enemy will still know where they last saw you.
|
items.weapon.missiles.darts.blindingdart.desc=These darts are tipped with a blindweed-based compound which will blind their target for a short time. They do not disorient however, so an enemy will still know where they last saw you.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user