Mod API Reference:GameOrderReceiveCard

From Warzone Wiki
Revision as of 17:21, 4 December 2018 by DanWL60 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

GameOrderReceiveCard: Subclass of GameOrder. This is used to award players cards. It should never be sent up to the server as part of a client's normal orders, instead it's only inserted into turns by the server. This happens normally as part of Warzone's normal card-receiving mechanic, or mods can add another one themselves in an AdvanceTurn hook.

Functions

  • WL.GameOrderReceiveCard.Create(playerID PlayerID, instances Array<CardInstance>) (static) returns GameOrderReceiveCard: Creates an instance of the GameOrderReceiveCard class. Note that mods can only award cards to players if those cards are enabled for the game.
    • playerID: Pass the ID of the player who will receive cards.
    • instances: Pass an array of whole cards to award to the player. See CardInstance for instructions on how to create these.