stealth breaking when attacking
This commit is contained in:
@@ -9,9 +9,11 @@
|
|||||||
|
|
||||||
package engine.jobs;
|
package engine.jobs;
|
||||||
|
|
||||||
|
import engine.Enum;
|
||||||
import engine.gameManager.CombatManager;
|
import engine.gameManager.CombatManager;
|
||||||
import engine.job.AbstractJob;
|
import engine.job.AbstractJob;
|
||||||
import engine.objects.AbstractCharacter;
|
import engine.objects.AbstractCharacter;
|
||||||
|
import engine.objects.PlayerCharacter;
|
||||||
|
|
||||||
public class AttackJob extends AbstractJob {
|
public class AttackJob extends AbstractJob {
|
||||||
|
|
||||||
@@ -29,6 +31,9 @@ public class AttackJob extends AbstractJob {
|
|||||||
@Override
|
@Override
|
||||||
protected void doJob() {
|
protected void doJob() {
|
||||||
CombatManager.doCombat(this.source, slot);
|
CombatManager.doCombat(this.source, slot);
|
||||||
|
if(this.source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))
|
||||||
|
if(((PlayerCharacter)this.source).getHidden() > 0)
|
||||||
|
this.source.removeEffectBySource(Enum.EffectSourceType.Invisibility,41,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean success() {
|
public boolean success() {
|
||||||
|
|||||||
@@ -304,7 +304,6 @@ public class CombatUtilities {
|
|||||||
if (targetMob.isSiege())
|
if (targetMob.isSiege())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float determineDamage(Mob agent) {
|
public static float determineDamage(Mob agent) {
|
||||||
|
|||||||
Reference in New Issue
Block a user