mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-04-14 19:56:30 +00:00
[AB-66] adding templates for mine game
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
{
|
||||
<#assign totalMines=mineCount>
|
||||
<#assign userLost=state.name() == "LOST">
|
||||
<#assign userWon=state.name() == "WON">
|
||||
<#assign ended=userLost || userWon>
|
||||
<#if creditsEnabled>
|
||||
<#assign changedCreditAmount=creditChange/>
|
||||
<#assign creditAmount=credits/>
|
||||
<#assign stateText><#if state.name() == "WON"><#include "mines_state_won_credits"><#elseif state.name() == "LOST"><#include "mines_state_lost_credits"><#else><#include "mines_state_continue_credits"></#if></#assign>
|
||||
<#else>
|
||||
<#assign stateText><#if state.name() == "WON"><#include "mines_state_won"><#elseif state.name() == "LOST"><#include "mines_state_lost"><#else><#include "mines_state_continue"></#if></#assign>
|
||||
</#if>
|
||||
"additionalMessage": "<@safe_include "mines_additional_message"/>",
|
||||
"buttons": [
|
||||
<#list rows as row>
|
||||
<#list row.fields as field>
|
||||
{
|
||||
<#if ended>
|
||||
<#assign label><#if field.counterValue != 0>${field.counterValue}<#elseif field.type.name() == "EXPLODED">💀<#elseif field.type.name() == "MINE">💣<#elseif field.type.name() == "UNCOVERED">o</#if></#assign>
|
||||
<#else>
|
||||
<#assign label><#if field.type.name() == "COVERED" || field.type.name() == "MINE">x<#elseif field.counterValue != 0>${field.counterValue}<#else>o</#if></#assign>
|
||||
</#if>
|
||||
"label": "${label}",
|
||||
"id": "${boardId}_${field.x}_${field.y}",
|
||||
"buttonStyle": "secondary",
|
||||
<#if ended>"disabled": true,</#if>
|
||||
"metaConfig": {
|
||||
"persistCallback": false
|
||||
<#if field?is_first>
|
||||
,"forceNewRow": true
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
<#sep>,
|
||||
</#list>
|
||||
<#sep>,
|
||||
</#list>
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<#include "invalid_mine_board_config_exception_text">
|
||||
@@ -0,0 +1 @@
|
||||
Play a game of to find mines in a field
|
||||
@@ -0,0 +1,5 @@
|
||||
You can create a minefield with at most 5x5 dimensions and a custom amount of mines.
|
||||
If you reveal a field which is not a mine, you will either uncover all adjacent free fields or show a number how many files are adjacent.
|
||||
If you reveal all fields (by clicking) which are no mines, you win!
|
||||
If economy is enabled, you have the ability to put some credits on the line, and potentially win a multiple of it.
|
||||
The result of the winnings depend on how many fields you managed to uncover, how many fields and mines there were in total (the more of both, the more credits) and if you completely uncovered the field.
|
||||
@@ -0,0 +1 @@
|
||||
How many credits you want to put on the line
|
||||
@@ -0,0 +1 @@
|
||||
Amount of rows of the field
|
||||
@@ -0,0 +1 @@
|
||||
Amount of mines which will be put in the field
|
||||
@@ -0,0 +1 @@
|
||||
Amount of columns of the field
|
||||
@@ -0,0 +1 @@
|
||||
${totalMines} Mines. ${stateText}
|
||||
@@ -0,0 +1 @@
|
||||
Continue... Playing for ${creditAmount} credits.
|
||||
@@ -0,0 +1 @@
|
||||
Continue...
|
||||
@@ -0,0 +1 @@
|
||||
You lost! You put ${creditAmount} credits on the line and got back ${changedCreditAmount}!
|
||||
@@ -0,0 +1 @@
|
||||
You lost!
|
||||
@@ -0,0 +1 @@
|
||||
You put ${creditAmount} credits on the line and won ${changedCreditAmount}!
|
||||
@@ -0,0 +1 @@
|
||||
You won!
|
||||
@@ -0,0 +1 @@
|
||||
Games
|
||||
@@ -0,0 +1 @@
|
||||
Invalid mines configuration: Width and height at least 1 and at most 5 each. There must at least one mine and at least one field without a mine!
|
||||
Reference in New Issue
Block a user