v0.4.0: fixed some bugs and adjusted lucky enchant
This commit is contained in:
parent
5a30d89647
commit
f20130de0f
|
@ -895,7 +895,7 @@ public class Hero extends Char {
|
|||
public int attackProc( Char enemy, int damage ) {
|
||||
KindOfWeapon wep = rangedWeapon != null ? rangedWeapon : belongings.weapon;
|
||||
|
||||
if (wep != null) wep.proc( this, enemy, damage );
|
||||
if (wep != null) damage = wep.proc( this, enemy, damage );
|
||||
|
||||
switch (subClass) {
|
||||
case SNIPER:
|
||||
|
|
|
@ -123,8 +123,7 @@ public class Statue extends Mob {
|
|||
|
||||
@Override
|
||||
public int attackProc( Char enemy, int damage ) {
|
||||
weapon.proc( this, enemy, damage );
|
||||
return damage;
|
||||
return weapon.proc( this, enemy, damage );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
|
@ -35,10 +36,14 @@ public class Lucky extends Weapon.Enchantment {
|
|||
int level = Math.max( 0, weapon.level() );
|
||||
|
||||
if (Random.Int(100) < (50 + level)){
|
||||
return weapon.max() - defender.dr()/2;
|
||||
int exStr = 0;
|
||||
if (attacker == Dungeon.hero) exStr = Math.max(0, Dungeon.hero.STR() - weapon.STRReq());
|
||||
damage = weapon.max() + exStr - Random.IntRange(0, defender.dr());
|
||||
} else {
|
||||
return weapon.min() - defender.dr()/2;
|
||||
damage = weapon.min() - Random.IntRange(0, defender.dr());
|
||||
}
|
||||
|
||||
return Math.max(0, damage);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user