v1.3.0: replaced exhausting curse with dazzling curse
This commit is contained in:
@@ -1352,12 +1352,12 @@ items.weapon.curses.annoying.msg_4=ARE WE AT THE BOSS YET!?
|
||||
items.weapon.curses.annoying.msg_5=OUCH, DON'T SWING ME SO HARD!
|
||||
items.weapon.curses.annoying.desc=Annoying weapons are capable of speech, but they're a bit too energetic. They will often draw attention to you without meaning to.
|
||||
|
||||
items.weapon.curses.dazzling.name=dazzling %s
|
||||
items.weapon.curses.dazzling.desc=Dazzling weapons will sometimes flash with dazzling light, blinding everything that can see them.
|
||||
|
||||
items.weapon.curses.displacing.name=displacing %s
|
||||
items.weapon.curses.displacing.desc=Displacing weapons are infused with chaotic teleportation magic, possessing the ability to warp enemies around the floor randomly.
|
||||
|
||||
items.weapon.curses.exhausting.name=exhausting %s
|
||||
items.weapon.curses.exhausting.desc=Exhausting weapons take great effort to use, and will periodically weaken the wearer as a result.
|
||||
|
||||
items.weapon.curses.explosive.name=explosive %s
|
||||
items.weapon.curses.explosive.warm=Warm...
|
||||
items.weapon.curses.explosive.hot=Hot!
|
||||
|
||||
@@ -47,6 +47,9 @@ public class ShatteredPixelDungeon extends Game {
|
||||
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );
|
||||
|
||||
//v1.3.0
|
||||
com.watabou.utils.Bundle.addAlias(
|
||||
com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Dazzling.class,
|
||||
"com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Exhausting" );
|
||||
com.watabou.utils.Bundle.addAlias(
|
||||
com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Explosive.class,
|
||||
"com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Fragile" );
|
||||
|
||||
@@ -33,7 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.KindOfWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfFuror;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Annoying;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Displacing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Exhausting;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Dazzling;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Explosive;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Friendly;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Polarized;
|
||||
@@ -353,7 +353,7 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
};
|
||||
|
||||
private static final Class<?>[] curses = new Class<?>[]{
|
||||
Annoying.class, Displacing.class, Exhausting.class, Explosive.class,
|
||||
Annoying.class, Displacing.class, Dazzling.class, Explosive.class,
|
||||
Sacrificial.class, Wayward.class, Polarized.class, Friendly.class
|
||||
};
|
||||
|
||||
|
||||
@@ -21,24 +21,40 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Exhausting extends Weapon.Enchantment {
|
||||
public class Dazzling extends Weapon.Enchantment {
|
||||
|
||||
private static ItemSprite.Glowing BLACK = new ItemSprite.Glowing( 0x000000 );
|
||||
|
||||
@Override
|
||||
public int proc(Weapon weapon, Char attacker, Char defender, int damage ) {
|
||||
|
||||
float procChance = 1/15f * procChanceMultiplier(attacker);
|
||||
if (attacker == Dungeon.hero && Random.Float() < procChance) {
|
||||
Buff.affect(attacker, Weakness.class, Random.NormalIntRange(5, 20));
|
||||
float procChance = 1/10f * procChanceMultiplier(attacker);
|
||||
if (Random.Float() < procChance) {
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch.fieldOfView != null && ch.fieldOfView[defender.pos]){
|
||||
Buff.prolong(ch, Blindness.class, Blindness.DURATION);
|
||||
if (ch == Dungeon.hero){
|
||||
GameScene.flash(0x80FFFFFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Dungeon.level.heroFOV[attacker.pos] || Dungeon.level.heroFOV[defender.pos]){
|
||||
Sample.INSTANCE.play( Assets.Sounds.BLAST );
|
||||
}
|
||||
}
|
||||
|
||||
return damage;
|
||||
Reference in New Issue
Block a user