Menu

#147 Flipping a coin, rolling a die

open
5
2007-02-14
2007-02-14
ashsaver
No

Randomized results are actually a integral part of a lot of card games.

mtg has lots of coin flip cards like Stitch in Time and Frenetic Efreet, other games have coin flip cards and die roll cards.

It would be like a choice structure, something like

<rolldie faces="6">
<result roll="1">
whatever
</result>
<result roll="2">
whatever
</result>
etc
</rolldie>

For coin flips, something like

<flipcoin numflips="1">
<result numheads="1">
</result>
<result numheads="0">
</result>
</flipcoin>

Discussion

  • Fabrice Daugan

    Fabrice Daugan - 2007-02-14

    Logged In: YES
    user_id=161099
    Originator: NO

    For roll-dice action, i suggest :
    <modify-register value="6" register="stack" index="1" operation="random"/>
    This way :
    we can re-use all features of modify-register
    we can use the dice result as input as needed for Elvish Impersonators.

    For flip-coin action, we could use your suggested form, but also we can use the same action as roll-dice
    <modify-register value="2" register="stack" index="1" operation="random"/>
    I know the modify-register action is not as nice as your flip-coin action since a 'if-then-hop' action would be required.
    Also, i update the 'if-then-else' expression to add this feature inside complex expressions.

    As MP would detect the random ranges, and also would detect the kind of animation to play for exemple a rolling dice or a flipping coin.

    What do you think about this?

     
  • Fabrice Daugan

    Fabrice Daugan - 2007-02-14
    • assigned_to: nobody --> fabdouglas
     
  • ashsaver

    ashsaver - 2007-02-14

    Mockup card "Stitch in Time"

     
  • ashsaver

    ashsaver - 2007-02-14

    Logged In: YES
    user_id=1659337
    Originator: YES

    yeah, that's fine. The structure I suggested was just one structure, and it was just the first one that popped into my head and the one I thought was most intuitive. If you can reuse current structures, so much the better.

    I created a mockup of the card "Stitch in Time" as an example. Let me know if that's the structure you're looking for.
    File Added: Stitch_in_Time.xml

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.