cleaned up formatting:

- removed trailing whitespace
- changed all leading whitespace to tabs
- removed IDE created author comments
This commit is contained in:
Evan Debenham
2015-06-12 16:22:26 -04:00
parent baa83b7e43
commit cebdff0221
335 changed files with 8555 additions and 8714 deletions
@@ -38,7 +38,7 @@ public class MissileWeapon extends Weapon {
private static final String TXT_MISSILES = "Missile weapon";
private static final String TXT_YES = "Yes, I know what I'm doing";
private static final String TXT_NO = "No, I changed my mind";
private static final String TXT_R_U_SURE =
private static final String TXT_R_U_SURE =
"Do you really want to equip it as a melee weapon?";
{
@@ -61,37 +61,37 @@ public class MissileWeapon extends Weapon {
protected void onThrow( int cell ) {
Char enemy = Actor.findChar( cell );
if (enemy == null || enemy == curUser) {
if (this instanceof Boomerang)
super.onThrow( cell );
else
miss( cell );
if (this instanceof Boomerang)
super.onThrow( cell );
else
miss( cell );
} else {
if (!curUser.shoot( enemy, this )) {
miss( cell );
} else if (!(this instanceof Boomerang)){
int bonus = 0;
int bonus = 0;
for (Buff buff : curUser.buffs(RingOfSharpshooting.Aim.class))
bonus += ((RingOfSharpshooting.Aim)buff).level;
for (Buff buff : curUser.buffs(RingOfSharpshooting.Aim.class))
bonus += ((RingOfSharpshooting.Aim)buff).level;
if (curUser.heroClass == HeroClass.HUNTRESS && enemy.buff(PinCushion.class) == null)
bonus += 3;
if (Random.Float() > Math.pow(0.7, bonus))
Buff.affect(enemy, PinCushion.class).stick(this);
}
if (Random.Float() > Math.pow(0.7, bonus))
Buff.affect(enemy, PinCushion.class).stick(this);
}
}
}
protected void miss( int cell ) {
int bonus = 0;
for (Buff buff : curUser.buffs(RingOfSharpshooting.Aim.class)) {
bonus += ((RingOfSharpshooting.Aim)buff).level;
}
int bonus = 0;
for (Buff buff : curUser.buffs(RingOfSharpshooting.Aim.class)) {
bonus += ((RingOfSharpshooting.Aim)buff).level;
}
//degraded ring of sharpshooting will even make missed shots break.
if (Random.Float() < Math.pow(0.6, -bonus))
super.onThrow( cell );
if (Random.Float() < Math.pow(0.6, -bonus))
super.onThrow( cell );
}
@Override
@@ -100,9 +100,9 @@ public class MissileWeapon extends Weapon {
super.proc( attacker, defender, damage );
Hero hero = (Hero)attacker;
if (hero.rangedWeapon == null && stackable) {
if (quantity == 1) {
doUnequip( hero, false, false );
if (hero.rangedWeapon == null && stackable) {
if (quantity == 1) {
doUnequip( hero, false, false );
} else {
detach( null );
}
@@ -111,7 +111,7 @@ public class MissileWeapon extends Weapon {
@Override
public boolean doEquip( final Hero hero ) {
GameScene.show(
GameScene.show(
new WndOptions( TXT_MISSILES, TXT_R_U_SURE, TXT_YES, TXT_NO ) {
@Override
protected void onSelect(int index) {
@@ -149,12 +149,12 @@ public class MissileWeapon extends Weapon {
if (Dungeon.hero.belongings.backpack.items.contains( this )) {
if (STR > Dungeon.hero.STR()) {
info.append(
info.append(
"\n\nBecause of your inadequate strength the accuracy and speed " +
"of your attack with this " + name + " is decreased." );
}
if (STR < Dungeon.hero.STR() && Dungeon.hero.heroClass == HeroClass.HUNTRESS) {
info.append(
info.append(
"\n\nBecause of your excess strength the damage " +
"of your attack with this " + name + " is increased." );
}
@@ -163,7 +163,7 @@ public class MissileWeapon extends Weapon {
info.append( "\n\nAs this weapon is designed to be used at a distance, it is much less accurate if used at melee range.");
if (isEquipped( Dungeon.hero )) {
info.append( "\n\nYou hold the " + name + " at the ready." );
info.append( "\n\nYou hold the " + name + " at the ready." );
}
return info.toString();