It is currently 23 Apr 2024, 17:13
   
Text Size

Shortcuts

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Shortcuts

Postby schnautzr » 30 Jul 2014, 04:26

Can we have a feature that allows us to establish custom shortcuts and propose them to the computer opponent ingame?

  • 716. Taking Shortcuts
    • 716.1. When playing a game, players typically make use of mutually understood shortcuts rather than explicitly identifying each game choice (either taking an action or passing priority) a player makes.
      • 716.1a The rules for taking shortcuts are largely unformalized. As long as each player in the game understands the intent of each other player, any shortcut system they use is acceptable.
      • 716.1b Occasionally the game gets into a state in which a set of actions could be repeated
        indefinitely (thus creating a “loop”). In that case, the shortcut rules can be used to determine how many times those actions are repeated without having to actually perform them, and how the loop is broken.
    • 716.2. Taking a shortcut follows the following procedure.
      • 716.2a At any point in the game, the player with priority may suggest a shortcut by describing a sequence of game choices, for all players, that may be legally taken based on the current game state and the predictable results of the sequence of choices. This sequence may be a non-repetitive series of choices, a loop that repeats a specified number of times, multiple loops, or nested loops, and may even cross multiple turns. It can’t include conditional actions, where the outcome of a game event determines the next action a player takes. The ending point of this sequence must be a place where a player has priority, though it need not be the player proposing the shortcut.
        Example:
        A player controls a creature enchanted by Presence of Gond, which grants the creature the ability
        {T}: Put a 1/1 green Elf Warrior creature token onto the battlefield,
        and another player controls Intruder Alarm, which reads, in part,
        Whenever a creature enters the battlefield, untap all creatures.
        When the player has priority, he may suggest
        I’ll create a million tokens,
        indicating the sequence of activating the creature’s ability, all players passing priority, letting the creature’s ability resolve and put a token onto the battlefield (which causes Intruder Alarm’s ability to trigger), Intruder Alarm’s controller putting that triggered ability on the stack, all players passing priority, Intruder Alarm’s triggered ability resolving, all players passing priority until the player proposing the shortcut has priority, and repeating that sequence 999,999 more times, ending just after the last token-creating ability resolves.
      • 716.2b Each other player, in turn order starting after the player who suggested the shortcut, may either accept the proposed sequence, or shorten it by naming a place where he or she will make a game choice that’s different than what’s been proposed. (The player doesn’t need to specify at this time what the new choice will be.) This place becomes the new ending point of the proposed sequence.
        Example:
        The active player draws a card during her draw step, then says,
        Go.
        The nonactive player is holding Into the Fray (an instant that says
        Target creature attacks this turn if able
        ) and says,
        I’d like to cast a spell during your beginning of combat step.
        The current proposed shortcut is that all players pass priority at all opportunities during the turn until the nonactive player has priority during the beginning of combat step.
      • 716.2c Once the last player has either accepted or shortened the shortcut proposal, the shortcut is taken. The game advances to the last proposed ending point, with all game choices contained in the shortcut proposal having been taken. If the shortcut was shortened from the original proposal, the player who now has priority must make a different game choice than what was originally proposed for that player.
    • 716.3. Sometimes a loop can be fragmented, meaning that each player involved in the loop performs an independent action that results in the same game state being reached multiple times. If that happens, the active player (or, if the active player is not involved in the loop, the first player in turn order who is involved) must then make a different game choice so the loop does not continue.
      Example:
      In a two-player game, the active player controls a creature with the ability
      {0}: [This creature] gains flying,
      the nonactive player controls a permanent with the ability
      {0}: Target creature loses flying,
      and nothing in the game cares how many times an ability has been activated. Say the active player activates his creature’s ability, it resolves, then the nonactive player activates her permanent’s ability targeting that creature, and it resolves. This returns the game to a game state it was at before. The active player must make a different game choice (in other words, anything other than activating that creature’s ability again). The creature doesn’t have flying. Note that the nonactive player could have prevented the fragmented loop simply by not activating her permanent’s ability, in which case the creature would have had flying. The nonactive player always has the final choice and is therefore able to determine whether the creature has flying.
Here's what I have in mind:

  • New button/menu item called "Shortcuts..." which brings up a dialogue box.
  • This dialogue would include the following:
    • "New" button
    • "Close" button
    • Scrolling list of existing custom shortcuts
    • "Edit" button to edit the selected shortcut
    • "Propose" which would appear ingame only, allowing the player to propose the shortcut to the opponent(s).

A shortcut would probably be raw text (unless someone goes above and beyond!) and look like this:

Code: Select all
name("I'll create a million tokens!");
for(1 to <number>){
tapAndResolve("<creature>"); //taps the creature and passes all player priorities until the ability is resolved
}
This shortcut would require the player to select a creature and type a number. The game would automatically advance to the state where the shortcut resolves completely.

A shortcut proposed by the player would then be accepted or denied by the NPC(s), and a button would be added to the button panel. It would be a simple numbered button since there might be two or more shortcuts in the game. The tooltip for the button should be the name of the shortcut. Per rule #716.2c, the shortcut would be executed immediately after it is accepted (or shortened) by all players, and if shortened, the player who shortened it would be forced to choose an action other than what was originally proposed.
User avatar
schnautzr
 
Posts: 106
Joined: 23 Aug 2012, 01:13
Location: UTC -6/-5
Has thanked: 27 times
Been thanked: 7 times

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 27 guests


Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 27 guests

Login Form