v2.0.0: added 'stance' abilities for the quarterstaff and scimitar
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -1615,7 +1615,11 @@ items.weapon.melee.shortsword.desc=A quite short sword, only a few inches longer
|
||||
|
||||
items.weapon.melee.quarterstaff.name=quarterstaff
|
||||
items.weapon.melee.quarterstaff.stats_desc=This weapon blocks 0-2 damage.
|
||||
items.weapon.melee.quarterstaff.ability_name=defensive stance
|
||||
items.weapon.melee.quarterstaff.ability_desc=The duelist can assume a _defensive stance_ with a quarterstaff. This stance doubles her evasion for 6 turns, but costs two charges.
|
||||
items.weapon.melee.quarterstaff.desc=A staff of hardwood, its ends are shod with iron.
|
||||
items.weapon.melee.quarterstaff$defensivestance.name=defensive stance
|
||||
items.weapon.melee.quarterstaff$defensivestance.desc=The Duelist is using her quarterstaff to deflect incoming blows and projectiles. As long as she is in this stance, her evasion against all attacks is doubled.\n\nTurns remaining: %s.
|
||||
|
||||
items.weapon.melee.rapier.name=rapier
|
||||
items.weapon.melee.rapier.ability_name=lunge
|
||||
@@ -1646,7 +1650,11 @@ items.weapon.melee.sai.desc=Two thin blades meant to be wielded in one hand each
|
||||
|
||||
items.weapon.melee.scimitar.name=scimitar
|
||||
items.weapon.melee.scimitar.stats_desc=This is a rather fast weapon.
|
||||
items.weapon.melee.scimitar.ability_name=sword dance
|
||||
items.weapon.melee.scimitar.ability_desc=The duelist can perform a _sword dance_ with a scimitar. This stance grants the Duelist +60% attack speed and -33% accuracy for 6 turns, and costs two charges.
|
||||
items.weapon.melee.scimitar.desc=A thick curved blade. Its shape allows for faster, yet less powerful attacks.
|
||||
items.weapon.melee.scimitar$sworddance.name=sword dance
|
||||
items.weapon.melee.scimitar$sworddance.desc=The Duelist is making quick momentum based strikes with her weapon, in a sort of dance. While this stance is active, she attacks 60%% faster with melee weapons (enough to attack exactly twice a turn with a scimiar), but suffers -33%% accuracy.\n\nTurns remaining: %s.
|
||||
|
||||
items.weapon.melee.spear.name=spear
|
||||
items.weapon.melee.spear.stats_desc=This is a rather slow weapon.\nThis weapon has extra reach.
|
||||
|
||||
@@ -121,6 +121,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Flail;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Quarterstaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RoundShield;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Sai;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
|
||||
@@ -505,6 +506,10 @@ public class Hero extends Char {
|
||||
evasion *= 5f;
|
||||
}
|
||||
}
|
||||
|
||||
if (buff(Quarterstaff.DefensiveStance.class) != null){
|
||||
evasion *= 2;
|
||||
}
|
||||
|
||||
if (paralysed > 0) {
|
||||
evasion /= 2;
|
||||
|
||||
@@ -54,6 +54,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shocki
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Unstable;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Vampiric;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RunicBlade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Scimitar;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
@@ -184,6 +185,10 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
ACC /= 5;
|
||||
}
|
||||
|
||||
if (owner.buff(Scimitar.SwordDance.class) != null){
|
||||
ACC *= 0.67f;
|
||||
}
|
||||
|
||||
return encumbrance > 0 ? (float)(ACC / Math.pow( 1.5, encumbrance )) : ACC;
|
||||
}
|
||||
|
||||
@@ -205,7 +210,13 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
}
|
||||
|
||||
protected float speedMultiplier(Char owner ){
|
||||
return RingOfFuror.attackSpeedMultiplier(owner);
|
||||
float multi = RingOfFuror.attackSpeedMultiplier(owner);
|
||||
|
||||
if (owner.buff(Scimitar.SwordDance.class) != null){
|
||||
multi += 0.6f;
|
||||
}
|
||||
|
||||
return multi;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,8 +22,13 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
||||
public class Quarterstaff extends MeleeWeapon {
|
||||
|
||||
@@ -45,4 +50,36 @@ public class Quarterstaff extends MeleeWeapon {
|
||||
public int defenseFactor( Char owner ) {
|
||||
return 2; //2 extra defence
|
||||
}
|
||||
|
||||
@Override
|
||||
public float abilityChargeUse(Hero hero) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void duelistAbility(Hero hero, Integer target) {
|
||||
onAbilityUsed(hero);
|
||||
Buff.prolong(hero, DefensiveStance.class, 5f); //4 turns as using the ability is instant
|
||||
hero.sprite.operate(hero.pos);
|
||||
hero.next();
|
||||
}
|
||||
|
||||
public static class DefensiveStance extends FlavourBuff {
|
||||
|
||||
{
|
||||
announced = true;
|
||||
type = buffType.POSITIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.DUEL_EVASIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float iconFadePercent() {
|
||||
return Math.max(0, (6 - visualcooldown()) / 6);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class RoundShield extends MeleeWeapon {
|
||||
|
||||
public static void guardAbility(Hero hero, int duration, MeleeWeapon wep){
|
||||
wep.onAbilityUsed(hero);
|
||||
Buff.affect(hero, GuardTracker.class, duration);
|
||||
Buff.prolong(hero, GuardTracker.class, duration);
|
||||
hero.sprite.operate(hero.pos);
|
||||
hero.spendAndNext(Actor.TICK);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,11 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
||||
public class Scimitar extends MeleeWeapon {
|
||||
|
||||
@@ -41,4 +45,35 @@ public class Scimitar extends MeleeWeapon {
|
||||
lvl*(tier+1); //scaling unchanged
|
||||
}
|
||||
|
||||
@Override
|
||||
public float abilityChargeUse(Hero hero) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void duelistAbility(Hero hero, Integer target) {
|
||||
onAbilityUsed(hero);
|
||||
Buff.prolong(hero, SwordDance.class, 5f); //5 turns as using the ability is instant
|
||||
hero.sprite.operate(hero.pos);
|
||||
hero.next();
|
||||
}
|
||||
|
||||
public static class SwordDance extends FlavourBuff {
|
||||
|
||||
{
|
||||
announced = true;
|
||||
type = buffType.POSITIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.DUEL_DANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float iconFadePercent() {
|
||||
return Math.max(0, (6 - visualcooldown()) / 6);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ import java.util.LinkedHashMap;
|
||||
public class BuffIndicator extends Component {
|
||||
|
||||
//transparent icon
|
||||
public static final int NONE = 63;
|
||||
public static final int NONE = 127;
|
||||
|
||||
//FIXME this is becoming a mess, should do a big cleaning pass on all of these
|
||||
//and think about tinting options
|
||||
@@ -114,6 +114,8 @@ public class BuffIndicator extends Component {
|
||||
public static final int DUEL_CLEAVE = 60;
|
||||
public static final int DUEL_GUARD = 61;
|
||||
public static final int DUEL_SPIN = 62;
|
||||
public static final int DUEL_EVASIVE= 63;
|
||||
public static final int DUEL_DANCE = 64;
|
||||
|
||||
public static final int SIZE_SMALL = 7;
|
||||
public static final int SIZE_LARGE = 16;
|
||||
|
||||
Reference in New Issue
Block a user