This is a documentation for Board Game Arena: play board games online !

Template:Option: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
No edit summary
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div title="{{{d|default}}} option" class="mw-collapsible mw-{{{st|}}}" style="display:flex;flex-flow:column nowrap;margin:1rem;margin-left:calc({{{i|0}}}*1rem);font-family:Roboto,Arial,sans-serif;font-size:16px;color:rgb(78 78 78);"><div class="mw-collapsible-toggle" style="display:flex;align-items:center;width:100%;padding:8px;border-radius:5px;box-shadow:rgb(0 0 0/25%) 2px 2px 5px 0;background:linear-gradient(#f0f0f0,#f3f3f3 30%,#ebebeb);font-weight:700;"><div style="width:24px;height:24px;margin-right:1rem;border-radius:5px;{{{s|b}}}ackground:#66DF00;box-shadow:inset rgb(0 0 0 /40%) 1px 1px 5px,rgb(0 0 0 /10%) 0 0 1px;"></div><div style="flex:1 1 0%;">{{{1|Option}}}</div><div style="display:flex;width:11px;height:11px;border-radius:50%;{{{d|b}}}ackground:rgb(211 211 211);"></div></div><div class="mw-collapsible-content" style="width:100%;min-height:0;max-height:min-content;height:{{{2|0}}};padding:0.25rem 0.5rem 0.5rem 0.5rem;padding:{{{2|0}}};border-radius:0 0 5px 5px;background:linear-gradient(180deg,rgb(224,223,222),rgb(243,243,243) 15px);">{{{2|&ZeroWidthSpace;}}}</div></div><noinclude>
<div title="option" class="mw-collapsible" style="display:inline-flex;flex-flow:column nowrap;margin-top:0.125rem;border-radius:5px;width:clamp(4rem,{{{w|500}}}px,100%);box-shadow:rgb(0 0 0/25%) 2px 2px 5px 0;font-family:Roboto,Arial,sans-serif;color:rgb(78 78 78);"><div class="mw-collapsible-toggle" style="display:flex;align-items:center;z-index:2;padding:0.5rem;border-radius:5px;box-shadow:rgb(0 0 0/25%) 2px 2px 5px 0;background:linear-gradient(#f0f0f0,#f3f3f3 30%,#ebebeb);font-weight:700;"><div style="{{{s|v}}}{{{ds|i}}}sibility:hidden;margin-right:1rem;{{{s|m}}}{{{ds|a}}}rgin:0;width:1.5rem;height:1.5rem;border-radius:5px;background:#66DF00;{{{s|b}}}ackground:none;box-shadow:inset rgb(0 0 0 /40%) 1px 1px 5px,rgb(0 0 0 /10%) 0 0 1px;"></div><div style="flex:1 1 0;font-size:1rem;">{{{1|Option}}}</div><div style="{{{df|v}}}isibility:hidden;margin-left:1rem;width:0.6875rem;height:0.6875rem;border-radius:50%;background:rgb(211 211 211);"></div></div><div class="mw-collapsible-content" style="z-index:1;margin-top:-10px;padding:10px 0.5rem 0 0.5rem;border-radius:5px;background:linear-gradient(180deg,rgb(224,223,222) 5px,rgb(243,243,243) 2rem);">{{{2|}}}</div><div class="mw-collapsible-content" style="display:flex;flex-flow:column wrap;width:calc(100% - 1.5rem);margin-top:-10px;padding:10px 0 0 1.5rem;border-radius:5px;background:#f2f2f2;">{{{3|}}}</div></div><noinclude>


== Examples ==
== Example ==


{{option|d=|Selected and non-default|Description of the option}}
{{option|s=|df=|Last two|
{{option|s=|Deselected and default|Description of the option}}
* Last two tricks score negative points.
 
}}
{{option|d=|Geronimo|
{{option|s=|df=|Domino|
* Everyone plays every contract.
* Extra hand where plays must be either:
* Dealer selects contracts.
** same rank as a played card, or
** same suit and one rank above or below a played card.
* {{card|A}} ⇨ play again.
* Must play, else pass.
|{{option|s=|df=|Taker can choose start suit in Domino}}
}}
{{option|ds=|df=|Salade|
* Extra hand with '''multiple contracts''': no tricks, no {{heart}}, no {{card|Q}}, no {{heart|K}}.
* {{heart|Q}} ⇨ -2({{card|Q}}) -1({{heart}}) ⇨ '''-3''' points (32 cards).
* {{heart|K}} ⇨ -8({{heart|K}}) -1({{heart}}) ⇨ '''-9''' points (32 cards).
}}
{{option|ds=|df=|Anti-Salade|
* Salade with '''positive score'''.
}}
}}


{{option|i=2|Doubling|
{{optionGroup|Game mode|
{{option|df=|Regular - 1 iteration}}
{{option|Regular - 2 iterations}}
{{option|Regular - 3 iterations}}
{{option|Geronimo|
* Each dealer deals once for every contract.
|{{option|ds=|df=|Doubling|
* After the dealer selects a contract, '''non-dealers''' may optionally choose to double any player(s).
* After the dealer selects a contract, '''non-dealers''' may optionally choose to double any player(s).
* In '''positive games''', non-dealers can only double the dealer.
* In '''positive games''', non-dealers can only double the dealer.
* Non-dealers must double the dealer '''at least twice''' during the game for each dealer.
* Non-dealers must double the dealer '''at least twice''' during the game for each dealer.
* '''Any doubled player''' may redouble.
* Between each pair of players (P₁ &amp; P₂), where P₁ has a higher score than P₂:
** P₁ gains the difference between their scores ⇨ + (P₁ − P₂).
** P₂ loses the difference between their scores ⇨ − (P₁ − P₂).
* Redoubled:
** P₁ gains twice the difference between their scores ⇨ + 2×(P₁ − P₂).
** P₂ loses twice the difference between their scores ⇨ − 2×(P₁ − P₂).
  }}
  {{option|s=|df=|Trumps|
* Dealer selects trump color.
* Must follow suit, else
* must '''play a trump''', else
* must discard.
  |{{option|s=|df=|Must play higher trumps|
* Whenever a trump is played, each player must play a '''higher trump''' than those played before if possible.
  }}
  {{option|s=|df=|Must play trumps if cannot follow suit|
* Must play a trump instead of discard if possible.
  }}
  }}
}}
}}
{{optionGroup|Type of deck|
{{option|52-card deck}}
{{option|df=|32-card deck}}
{{option|36-card deck}}
}}
{{option|ds=|df=|House Rules||
{{optionGroup|Can lead hearts|
  {{option|df=|Only when already played|
* No {{heart}} or No {{heart|K}}: cannot lead {{heart}} until a {{heart}} is discarded.
  }}
  {{option|Anywhen|
* Anyone can lead {{heart}} whenever they want.
  }}
}}
{{optionGroup|Take them all counts positive|
  {{option|df=|No|
* Every trick counts negatively.
  }}
  {{option|Tricks only|
* No tricks and Salade: positive scoring.
* Anti-Salade: negative scoring.
  }}
  {{option|Tricks and hearts|
* No tricks, No {{heart}} and Salade: positive scoring.
* Anti-Salade: negative scoring.
  }}
  {{option|Tricks, hearts and Queens|
* No tricks, No {{heart}}, No {{card|Q}} and Salade: positive scoring.
* Anti-Salade: negative scoring.
  }}
}}
{{optionGroup|Points scoring|
  {{option|df=|Basic scoring|
* Will count scores with simple count (tricks score -1 each)
  }}
  {{option|Wikipedia scoring|
* Will count scores as described in the English Wikipedia page of Barbu (tricks score -2 each, hearts -2, ace of hearts -6...)
  }}
}}
}}
{{option|s=|Selected and description|Option description|
{{option|s=|df=|Sub-option, selected and default||
  {{option|ds=|df=|Sub-option, deselected, default and description|Sub-option description}}
}}
}}
}}
<code><nowiki>{{</nowiki>option|s=|Selected and description|Option description|
&nbsp;<nowiki>{{</nowiki>option|s=|df=|Sub-option, selected and default||
&nbsp;&nbsp;<nowiki>{{</nowiki>option|ds=|df=|Sub-option, deselected, default and description|Sub-option description<nowiki>}}</nowiki>
&nbsp;<nowiki>}}</nowiki>
<nowiki>}}</nowiki></code>


== Parameters ==
== Parameters ==
<div style="display:grid;grid-template-columns:2rem repeat(4,auto);gap:0.5rem;overflow:auto;text-overflow:ellipsis;">
<div style="display:grid;grid-template-columns:2rem auto 6rem auto auto;gap:0.5rem;overflow:auto;text-overflow:ellipsis;">
   <div style="font-weight:bold;width:8rem;">Id</div>
   <div style="font-weight:bold;width:8rem;">Id</div>
   <div style="font-weight:bold;width:8rem;">Name</div>
   <div style="font-weight:bold;width:8rem;">Name</div>
Line 31: Line 124:
   <div><code>2</code></div>
   <div><code>2</code></div>
   <div><code>description</code></div>
   <div><code>description</code></div>
   <div><code>&amp;ZeroWidthSpace;</code></div>
   <div><code>null</code></div>
   <div><code><nowiki>{{option|Value|Description}}</nowiki></code></div>
   <div><code><nowiki>{{option|Value|Description}}</nowiki></code></div>
   <div>'''''Optional:''''' specify a text description.</div>
   <div>'''''Optional:''''' specify a text description.</div>
  <div><code>3</code></div>
  <div><code>sub-option</code></div>
  <div><code>null</code></div>
  <div><code><nowiki>{{option|Value|Description|Sub-option}}</nowiki></code></div>
  <div>'''''Optional:''''' display a sub-option.</div>
   <div><code>s</code></div>
   <div><code>s</code></div>
   <div><code>selected</code></div>
   <div><code>selected</code></div>
   <div><code>n/a</code></div>
   <div><code>n/a</code></div>
   <div><code><nowiki>{{option|s=}}</nowiki></code></div>
   <div><code><nowiki>{{option|s=}}</nowiki></code></div>
   <div>'''''Optional:''''' hide checkbox color.</div>
   <div>'''''Optional:''''' display selected checkbox.</div>
   <div><code>d</code></div>
   <div><code>ds</code></div>
  <div><code>deselected</code></div>
  <div><code>n/a</code></div>
  <div><code><nowiki>{{option|ds=}}</nowiki></code></div>
  <div>'''''Optional:''''' display deselected checkbox.</div>
  <div><code>df</code></div>
   <div><code>default</code></div>
   <div><code>default</code></div>
   <div><code>n/a</code></div>
   <div><code>n/a</code></div>
   <div><code><nowiki>{{option|d=}}</nowiki></code></div>
   <div><code><nowiki>{{option|df=}}</nowiki></code></div>
   <div>'''''Optional:''''' hide default marker.</div>
   <div>'''''Optional:''''' display default marker.</div>
   <div><code>i</code></div>
   <div><code>w</code></div>
   <div><code>indent</code></div>
   <div><code>preferred width</code></div>
   <div><code>0</code></div>
   <div><code>500</code></div>
   <div><code><nowiki>{{option|i=1}}</nowiki></code></div>
   <div><code><nowiki>{{option|w=600}}</nowiki></code></div>
   <div>'''''Optional:''''' indent the option in rem units
   <div>'''''Optional:''''' specify the preferred width in px units.</div>
<br>(for options that are sub-options of others).</div>
  <div><code>st</code></div>
  <div><code>state</code></div>
  <div><code>null</code></div>
  <div><code><nowiki>{{option|st=collapsed}}</nowiki></code></div>
  <div>'''''Optional:''''' collapse description by default.</div>
</div>
</div>
</noinclude>
</noinclude>

Latest revision as of 17:21, 8 March 2024

Option

Example

Last two
  • Last two tricks score negative points.
Domino
  • Extra hand where plays must be either:
    • same rank as a played card, or
    • same suit and one rank above or below a played card.
  • A ⇨ play again.
  • Must play, else pass.
Taker can choose start suit in Domino
Salade
  • Extra hand with multiple contracts: no tricks, no ​♥, no Q, no K♥.
  • Q♥ ⇨ -2(Q) -1(​♥) ⇨ -3 points (32 cards).
  • K♥ ⇨ -8(K♥) -1(​♥) ⇨ -9 points (32 cards).
Anti-Salade
  • Salade with positive score.
Game mode
Regular - 1 iteration
Regular - 2 iterations
Regular - 3 iterations
Geronimo
  • Each dealer deals once for every contract.
Doubling
  • After the dealer selects a contract, non-dealers may optionally choose to double any player(s).
  • In positive games, non-dealers can only double the dealer.
  • Non-dealers must double the dealer at least twice during the game for each dealer.
  • Any doubled player may redouble.
  • Between each pair of players (P₁ & P₂), where P₁ has a higher score than P₂:
    • P₁ gains the difference between their scores ⇨ + (P₁ − P₂).
    • P₂ loses the difference between their scores ⇨ − (P₁ − P₂).
  • Redoubled:
    • P₁ gains twice the difference between their scores ⇨ + 2×(P₁ − P₂).
    • P₂ loses twice the difference between their scores ⇨ − 2×(P₁ − P₂).
Trumps
  • Dealer selects trump color.
  • Must follow suit, else
  • must play a trump, else
  • must discard.
Must play higher trumps
  • Whenever a trump is played, each player must play a higher trump than those played before if possible.
Must play trumps if cannot follow suit
  • Must play a trump instead of discard if possible.
Type of deck
52-card deck
32-card deck
36-card deck
House Rules
Can lead hearts
Only when already played
  • No ​♥ or No K♥: cannot lead ​♥ until a ​♥ is discarded.
Anywhen
  • Anyone can lead ​♥ whenever they want.
Take them all counts positive
No
  • Every trick counts negatively.
Tricks only
  • No tricks and Salade: positive scoring.
  • Anti-Salade: negative scoring.
Tricks and hearts
  • No tricks, No ​♥ and Salade: positive scoring.
  • Anti-Salade: negative scoring.
Tricks, hearts and Queens
  • No tricks, No ​♥, No Q and Salade: positive scoring.
  • Anti-Salade: negative scoring.
Points scoring
Basic scoring
  • Will count scores with simple count (tricks score -1 each)
Wikipedia scoring
  • Will count scores as described in the English Wikipedia page of Barbu (tricks score -2 each, hearts -2, ace of hearts -6...)
Selected and description
Option description
Sub-option, selected and default
Sub-option, deselected, default and description
Sub-option description

{{option|s=|Selected and description|Option description|

 {{option|s=|df=|Sub-option, selected and default||

  {{option|ds=|df=|Sub-option, deselected, default and description|Sub-option description}}

 }}

}}

Parameters

Id
Name
Default value
Example
Description
1
value
Option
{{option|Value}}
Required: specify a text value.
2
description
null
{{option|Value|Description}}
Optional: specify a text description.
3
sub-option
null
{{option|Value|Description|Sub-option}}
Optional: display a sub-option.
s
selected
n/a
{{option|s=}}
Optional: display selected checkbox.
ds
deselected
n/a
{{option|ds=}}
Optional: display deselected checkbox.
df
default
n/a
{{option|df=}}
Optional: display default marker.
w
preferred width
500
{{option|w=600}}
Optional: specify the preferred width in px units.