Přidán build script, předělaná struktura, funkční spouštění serveru z clienta. Client je schopen fungovat po více her bez restartu. Bugfixy
This commit is contained in:
parent
c942d23a87
commit
1a27dd6fab
22 changed files with 269 additions and 136 deletions
|
|
@ -55,25 +55,22 @@ public class NekoEnemy : Enemy {
|
|||
Server.SendUpdateToAll([GameEvent.NEKO_ANGERED(Location.Owner.state.pid, Id)]);
|
||||
}
|
||||
|
||||
if (movementOpportunity.CheckAndRoll() || (Aggressive && GameLogic.NSecondUpdate)){
|
||||
if (Target == null){
|
||||
if (Server.P1.state.power > Server.P2.state.power){
|
||||
Target = Server.P2;
|
||||
}
|
||||
else if (Server.P1.state.power < Server.P2.state.power){
|
||||
Target = Server.P1;
|
||||
}
|
||||
else{
|
||||
if (GameLogic.PhaseCounter > 1){
|
||||
Target = Server.Players[new Random().Next(2)];
|
||||
SetDifficulty(8);
|
||||
}
|
||||
else{
|
||||
return;
|
||||
}
|
||||
if (Target == null){
|
||||
if (Server.P1.state.power > Server.P2.state.power){
|
||||
Target = Server.P2;
|
||||
}
|
||||
else if (Server.P1.state.power < Server.P2.state.power){
|
||||
Target = Server.P1;
|
||||
}
|
||||
else{
|
||||
if (GameLogic.PhaseCounter > 1){
|
||||
Target = Server.Players[new Random().Next(2)];
|
||||
SetDifficulty(8);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Target != null && (movementOpportunity.CheckAndRoll() || (Aggressive && GameLogic.NSecondUpdate))){
|
||||
Pathfinder.Decision decision = pathfinder.DecideNext(MapManager.Get(Target.state.officeTileId));
|
||||
switch (decision.type){
|
||||
case Pathfinder.Decision.MoveType:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue