V0.2.0: Corrected a bug from the source involving free hits on game loads
This commit is contained in:
parent
cce6e8dfa0
commit
69e82d475d
|
@ -84,6 +84,7 @@ public abstract class Mob extends Char {
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final String STATE = "state";
|
private static final String STATE = "state";
|
||||||
|
private static final String SEEN = "seen";
|
||||||
private static final String TARGET = "target";
|
private static final String TARGET = "target";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -92,6 +93,7 @@ public abstract class Mob extends Char {
|
||||||
super.storeInBundle( bundle );
|
super.storeInBundle( bundle );
|
||||||
|
|
||||||
bundle.put( STATE, state.toString() );
|
bundle.put( STATE, state.toString() );
|
||||||
|
bundle.put( SEEN, enemySeen);
|
||||||
if (state != State.SLEEPING) {
|
if (state != State.SLEEPING) {
|
||||||
bundle.put( TARGET, target );
|
bundle.put( TARGET, target );
|
||||||
}
|
}
|
||||||
|
@ -103,6 +105,7 @@ public abstract class Mob extends Char {
|
||||||
super.restoreFromBundle( bundle );
|
super.restoreFromBundle( bundle );
|
||||||
|
|
||||||
state = State.valueOf( bundle.getString( STATE ) );
|
state = State.valueOf( bundle.getString( STATE ) );
|
||||||
|
enemySeen = bundle.getBoolean( SEEN );
|
||||||
if (state != State.SLEEPING) {
|
if (state != State.SLEEPING) {
|
||||||
target = bundle.getInt( TARGET );
|
target = bundle.getInt( TARGET );
|
||||||
}
|
}
|
||||||
|
@ -388,8 +391,9 @@ public abstract class Mob extends Char {
|
||||||
if (penalty != 0)
|
if (penalty != 0)
|
||||||
defenseSkill *= Math.pow(0.75, penalty);
|
defenseSkill *= Math.pow(0.75, penalty);
|
||||||
return defenseSkill;
|
return defenseSkill;
|
||||||
} else
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user