forked from One-Piece-Online/OPOnline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLandmarkAbilities.php
More file actions
38 lines (34 loc) · 972 Bytes
/
LandmarkAbilities.php
File metadata and controls
38 lines (34 loc) · 972 Bytes
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
<?php
function PlayLandmark($cardID, $player)
{
global $landmarks;
if (count($landmarks) > 0) DestroyLandmark(0); //Right now, playing a new landmark destroys the old landmark
if (CardSubtype($cardID) != "Landmark") {
WriteError($cardID . " was tried to play as a landmark, but is not a landmark.");
return;
}
array_push($landmarks, $cardID);
array_push($landmarks, $player); //The player that originally played the landmark
}
function DestroyLandmark($index)
{
global $landmarks;
$cardID = $landmarks[$index];
$ownerID = $landmarks[$index + 1];
for($j = $index + LandmarkPieces() - 1; $j >= $index; --$j) {
unset($landmarks[$j]);
}
$landmarks = array_values($landmarks);
AddGraveyard($cardID, $ownerID, "PLAY");
return $cardID;
}
function LandmarkBeginEndPhaseAbilities()
{
global $landmarks, $mainPlayer;
for ($i = 0; $i < count($landmarks); ++$i) {
switch ($landmarks[$i]) {
default:
break;
}
}
}