forked from SWU-Karabast/SWUOnline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStartEffects.php
54 lines (40 loc) · 1.24 KB
/
StartEffects.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
//include "ParseGamestate.php";
//include "WriteLog.php";
array_push($layerPriority, ShouldHoldPriority(1), ShouldHoldPriority(2));
$mainPlayer = $firstPlayer;
$currentPlayer = $firstPlayer;
$otherPlayer = ($currentPlayer == 1 ? 2 : 1);
StatsStartTurn();
$MakeStartTurnBackup = false;
$MakeStartGameBackup = false;
$p1Material = &GetMaterial(1);
AddCharacter($p1Material[0], 1);
AddCharacter($p1Material[MaterialPieces()], 1);
$p2Material = &GetMaterial(2);
if(count($p2Material) == 1 && $p2Material[0] == "DUMMY")
{
AddCharacter("DUMMY", 2);
} else {
AddCharacter($p2Material[0], 2);
AddCharacter($p2Material[MaterialPieces()], 2);
}
/*
AI TODO: Set this if it's an AI
if($p2CharEquip[0] == "DUMMY") {
SetCachePiece($gameName, 3, "99999999999999");
}
*/
//Start of game effects go here
$initiativePlayer = $firstPlayer;
$intiativeTaken = 0;
AddDecisionQueue("SHUFFLEDECK", 1, "SKIPSEED");
AddDecisionQueue("SHUFFLEDECK", 2, "SKIPSEED");
AddDecisionQueue("STARTGAME", $initiativePlayer, "-");
ProcessDecisionQueue();
DoGamestateUpdate();
include "WriteGamestate.php";
if($MakeStartTurnBackup) MakeStartTurnBackup();
if($MakeStartGameBackup) MakeGamestateBackup("origGamestate.txt");
?>
Something is wrong with the XAMPP installation :-(