-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77c8e55
commit c2c9c51
Showing
26 changed files
with
312 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,51 @@ | ||
def on_player_global_cariable_changed(args): | ||
startingPlayer() | ||
TwilightCard = "fb909fa6-1ed7-44f7-a214-77b9bf5ce90d" | ||
BidVariable = "burdenBid" | ||
BidDefault = 999 | ||
DeckLoaded = "deckLoaded" | ||
|
||
def deck_loaded(args): | ||
|
||
def on_player_global_variable_changed(_): | ||
determine_starting_player() | ||
|
||
|
||
def on_deck_loaded(args): | ||
if args.player == me: | ||
me.setGlobalVariable("deckLoaded", "Yes") | ||
if all(player.getGlobalVariable("deckLoaded") == "Yes" for player in getPlayers()): | ||
twilight = table.create("fb909fa6-1ed7-44f7-a214-77b9bf5ce90d", -200, -31, 1, persist = True) | ||
set_deck_loaded(me) | ||
|
||
if all_players(is_deck_loaded): | ||
twilight = table.create(TwilightCard, -200, -31, 1, persist=True) | ||
notify("{}".format(twilight)) | ||
twilight.anchor = True | ||
|
||
def startingPlayer(): | ||
if all(player.getGlobalVariable("burdenBid") != "999" for player in getPlayers()): | ||
notify("{} has bid {} burden token(s).".format(me,int(me.getGlobalVariable("burdenBid")))) | ||
|
||
|
||
def notBid(group, x=0, y=0): | ||
if me.getGlobalVariable("burdenBid") == "999": | ||
return True | ||
else: return False | ||
|
||
|
||
def determine_starting_player(): | ||
if all_players(did_bid): | ||
notify("{} has bid {} burden token(s).".format(me, get_bid(me)) | ||
|
||
|
||
def get_bid(player): | ||
return int(player.getGlobalVariable(BidVariable)) | ||
|
||
|
||
def set_bid(player, value): | ||
player.setGlobalVariable(BidVariable, str(value)) | ||
|
||
|
||
def did_bid(player): | ||
return get_bid(player) != BidDefault | ||
|
||
|
||
def did_not_bid(group, x=0, y=0): | ||
return not did_bid(me) | ||
|
||
|
||
def all_players(test): | ||
return all(test(player) for player in getPlayers()) | ||
|
||
|
||
def is_deck_loaded(player): | ||
return player.getGlobalVariable(DeckLoaded) == "Yes" | ||
|
||
|
||
def set_deck_loaded(player): | ||
player.setGlobalVariable(DeckLoaded, "Yes") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
Discard = "Discard" | ||
|
||
|
||
def discard_card(card): | ||
mute() | ||
card.moveTo(me.piles[Discard]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1.14 MB
...bb97-c569-4ece-832a-2826e7612e23/Cards/fb909fa6-1ed7-44f7-a214-77b9bf5ce90d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" ?> | ||
<set gameId="98d26dd0-7ff6-4d2c-a023-0bc916d3f001" gameVersion="1.2.0.0" id="0ba2bb97-c569-4ece-832a-2826e7612e23" name="Special Cards" version="1.0"> | ||
<cards> | ||
<card id="fb909fa6-1ed7-44f7-a214-77b9bf5ce90d" name="Twilight Pool" size="SiteCard"> | ||
<property name="Text">Track the Twilight Pool here.</property> | ||
</card> | ||
</cards> | ||
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.