교역마을/계산 DB: 두 판 사이의 차이

리버티게임, 모두가 만들어가는 자유로운 게임
백괴게임>Manymaster
편집 요약 없음
백괴게임>Manymaster
편집 요약 없음
1번째 줄: 1번째 줄:
{{#vardefine:사람|{{예외|{{CGI2|변수=사람|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|사람}}|5}}}}|정수}}}}{{#var:사람}}
{{#vardefine:사람|{{예외|{{CGI2|변수=사람|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|사람}}|5}}}}|정수}}}}{{#ifexpr: {{#var:사람}} < 0 ||<span class="error"></span>}}
{{#vardefine:물|{{예외|{{CGI2|변수=물|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|물}}|20}}}}|정수}}}}{{#var:물}}
{{#vardefine:물|{{예외|{{CGI2|변수=물|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|물}}|20}}}}|정수}}}}{{#ifexpr: {{#var:물}} < 0 ||<span class="error"></span>}}
{{#vardefine:우물|{{예외|{{CGI2|변수=우물|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|우물}}|0}}}}|정수}}}}{{#var:우물}}
{{#vardefine:우물|{{예외|{{CGI2|변수=우물|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|우물}}|0}}}}|정수}}}}{{#ifexpr: {{#var:우물}} < 0 ||<span class="error"></span>}}
{{#vardefine:밀|{{예외|{{CGI2|변수=밀|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|밀}}|20}}}}|정수}}}}{{#var:밀}}
{{#vardefine:밀|{{예외|{{CGI2|변수=밀|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|밀}}|20}}}}|정수}}}}{{#ifexpr: {{#var:밀}} < 0 ||<span class="error"></span>}}
{{#vardefine:밀밭|{{예외|{{CGI2|변수=밀밭|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|밀밭}}|0}}}}|정수}}}}{{#var:밀밭}}
{{#vardefine:밀밭|{{예외|{{CGI2|변수=밀밭|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|밀밭}}|0}}}}|정수}}}}{{#ifexpr: {{#var:밀밭}} < 0 ||<span class="error"></span>}}
{{#vardefine:사과|{{예외|{{CGI2|변수=사과|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|사과}}|20}}}}|정수}}}}{{#var:사과}}
{{#vardefine:사과|{{예외|{{CGI2|변수=사과|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|사과}}|20}}}}|정수}}}}{{#ifexpr: {{#var:사과}} < 0 ||<span class="error"></span>}}
{{#vardefine:사과나무|{{예외|{{CGI2|변수=사과나무|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|사과나무}}|0}}}}|정수}}}}{{#var:사과나무}}
{{#vardefine:사과나무|{{예외|{{CGI2|변수=사과나무|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|사과나무}}|0}}}}|정수}}}}{{#ifexpr: {{#var:사과나무}} < 0 ||<span class="error"></span>}}
{{#vardefine:소고기|{{예외|{{CGI2|변수=소고기|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|소고기}}|0}}}}|정수}}}}{{#var:소고기}}
{{#vardefine:소고기|{{예외|{{CGI2|변수=소고기|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|소고기}}|0}}}}|정수}}}}{{#ifexpr: {{#var:소고기}} < 0 ||<span class="error"></span>}}
{{#vardefine:소|{{예외|{{CGI2|변수=소|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|소}}|0}}}}|정수}}}}{{#var:소}}
{{#vardefine:소|{{예외|{{CGI2|변수=소|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|소}}|0}}}}|정수}}}}{{#ifexpr: {{#var:소}} < 0 ||<span class="error"></span>}}
{{#vardefine:조개|{{예외|{{CGI2|변수=조개|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|조개}}|0}}}}|정수}}}}{{#var:조개}}
{{#vardefine:조개|{{예외|{{CGI2|변수=조개|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|조개}}|0}}}}|정수}}}}{{#ifexpr: {{#var:조개}} < 0 ||<span class="error"></span>}}
{{#vardefine:조개연구|{{예외|{{CGI2|변수=조개|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|조개연구}}|0}}}}|정수}}}}{{#var:조개연구}}
{{#vardefine:조개연구|{{예외|{{CGI2|변수=조개|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|조개연구}}|0}}}}|정수}}}}{{#ifexpr: {{#var:조개연구}} < 0 ||<span class="error"></span>}}


{{#vardefine:교역|{{#ifexist:교역마을/교역내역/{{:교역마을/계정/{{#username:}}|교역내역}}|교역마을/교역내역/{{:교역마을/계정/{{#username:}}|교역내역}}}}}}
{{#vardefine:교역|{{#ifexist:교역마을/교역내역/{{:교역마을/계정/{{#username:}}|교역내역}}|교역마을/교역내역/{{:교역마을/계정/{{#username:}}|교역내역}}}}}}
19번째 줄: 19번째 줄:
{{#vardefine:반입물품|{{#ifeq:{{#var:교역성립코드}}|3|{{:{{#var:교역}}|자원{{#expr: 3 - {{#var:자신확인}}}}}}|없음}}}}
{{#vardefine:반입물품|{{#ifeq:{{#var:교역성립코드}}|3|{{:{{#var:교역}}|자원{{#expr: 3 - {{#var:자신확인}}}}}}|없음}}}}


{{#vardefine:반입밀|{{예외|{{#ifexpr: {{#ifeq:{{#var:반입물품}}|밀|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}| {{#ifexpr: ({{:교역마을/계정/{{#var:교역상대}}|밀밭}} * 10 - {{:교역마을/계정/{{#var:교역상대}}|사람}} - {{:교역마을/계정/{{#var:교역상대}}|소}} - {{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}) >= 0 |{{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}|0}} |0}}|정수}}}}{{#var:반입밀}}
{{#vardefine:반입밀|{{예외|{{#ifexpr: {{#ifeq:{{#var:반입물품}}|밀|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}| {{#ifexpr: ({{:교역마을/계정/{{#var:교역상대}}|밀밭}} * 10 - {{:교역마을/계정/{{#var:교역상대}}|사람}} - {{:교역마을/계정/{{#var:교역상대}}|소}} - {{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}) >= 0 |{{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}|0}} |0}}|정수}}}}{{#ifexpr: {{#var:반입밀}} < 0 ||<span class="error"></span>}}
{{#vardefine:반입사과|{{예외|{{#ifexpr: {{#ifeq:{{#var:교역물품}}|사과|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}| {{#ifexpr: ({{:교역마을/계정/{{#var:교역상대}}|사과나무}} * 5 - {{:교역마을/계정/{{#var:교역상대}}|사람}} - {{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}) >= 0 |{{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}|0}} |0}}|정수}}}}{{#var:반입사과}}
{{#vardefine:반입사과|{{예외|{{#ifexpr: {{#ifeq:{{#var:교역물품}}|사과|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}| {{#ifexpr: ({{:교역마을/계정/{{#var:교역상대}}|사과나무}} * 5 - {{:교역마을/계정/{{#var:교역상대}}|사람}} - {{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}) >= 0 |{{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}|0}} |0}}|정수}}}}{{#ifexpr: {{#var:반입사과}} < 0 ||<span class="error"></span>}}
{{#vardefine:반입소고기|{{예외|{{#ifexpr: {{#ifeq:{{#var:교역물품}}|소고기|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}| {{#ifexpr: ({{:교역마을/계정/{{#var:교역상대}}|소}} * 5 - {{:교역마을/계정/{{#var:교역상대}}|사람}} - {{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}) >= 0 |{{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}|0}} |0}}|정수}}}}{{#var:반입소고기}}
{{#vardefine:반입소고기|{{예외|{{#ifexpr: {{#ifeq:{{#var:교역물품}}|소고기|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}| {{#ifexpr: ({{:교역마을/계정/{{#var:교역상대}}|소}} * 5 - {{:교역마을/계정/{{#var:교역상대}}|사람}} - {{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}) >= 0 |{{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}|0}} |0}}|정수}}}}{{#ifexpr: {{#var:반입소고기}} < 0 ||<span class="error"></span>}}
{{#vardefine:반입조개|{{예외|{{#ifexpr: {{#ifeq:{{#var:교역물품}}|조개|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}| {{#ifexpr: ({{:교역마을/계정/{{#var:교역상대}}|소}} * 5 - {{:교역마을/계정/{{#var:교역상대}}|사람}} - {{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}) >= 0 |{{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}|0}} |0}}|정수}}}}{{#var:반입조개}}
{{#vardefine:반입조개|{{예외|{{#ifexpr: {{#ifeq:{{#var:교역물품}}|조개|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}| {{#ifexpr: ({{:교역마을/계정/{{#var:교역상대}}|소}} * 5 - {{:교역마을/계정/{{#var:교역상대}}|사람}} - {{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}) >= 0 |{{:{{#var:교역}}|수량{{#expr: 3 - {{#var:자신확인}}}}}}|0}} |0}}|정수}}}}{{#ifexpr: {{#var:반입조개}} < 0 ||<span class="error"></span>}}


{{#vardefine:반출밀|{{예외|{{#ifexpr: {{#ifeq:{{#var:반출물품}}|밀|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}|{{:{{#var:교역}}|수량{{#var:자신확인}}}}|0}}|정수}}}}{{#var:반출밀}}
{{#vardefine:반출밀|{{예외|{{#ifexpr: {{#ifeq:{{#var:반출물품}}|밀|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}|{{:{{#var:교역}}|수량{{#var:자신확인}}}}|0}}|정수}}}}{{#ifexpr: {{#var:반출밀}} < 0 ||<span class="error"></span>}}
{{#vardefine:반출사과|{{예외|{{#ifexpr: {{#ifeq:{{#var:반출물품}}|사과|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}|{{:{{#var:교역}}|수량{{#var:자신확인}}}}|0}}|정수}}}}{{#var:반출사과}}
{{#vardefine:반출사과|{{예외|{{#ifexpr: {{#ifeq:{{#var:반출물품}}|사과|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}|{{:{{#var:교역}}|수량{{#var:자신확인}}}}|0}}|정수}}}}{{#ifexpr: {{#var:반출사과}} < 0 ||<span class="error"></span>}}
{{#vardefine:반출소고기|{{예외|{{#ifexpr: {{#ifeq:{{#var:반출물품}}|소고기|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}|{{:{{#var:교역}}|수량{{#var:자신확인}}}}|0}}|정수}}}}{{#var:반출소고기}}
{{#vardefine:반출소고기|{{예외|{{#ifexpr: {{#ifeq:{{#var:반출물품}}|소고기|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}|{{:{{#var:교역}}|수량{{#var:자신확인}}}}|0}}|정수}}}}{{#ifexpr: {{#var:반출소고기}} < 0 ||<span class="error"></span>}}
{{#vardefine:반출조개|{{예외|{{#ifexpr: {{#ifeq:{{#var:반출물품}}|조개|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}|{{:{{#var:교역}}|수량{{#var:자신확인}}}}|0}}|정수}}}}{{#var:반출조개}}
{{#vardefine:반출조개|{{예외|{{#ifexpr: {{#ifeq:{{#var:반출물품}}|조개|1|0}} and {{#ifeq:{{#var:교역성립코드}}|3|1|0}}|{{:{{#var:교역}}|수량{{#var:자신확인}}}}|0}}|정수}}}}{{#ifexpr: {{#var:반출조개}} < 0 ||<span class="error"></span>}}


{{#vardefine:밀수요|{{#expr:{{#var:사람}} + {{#var:소}} + {{#var:반출밀}} }} }}
{{#vardefine:밀수요|{{#expr:{{#var:사람}} + {{#var:소}} + {{#var:반출밀}} }} }}
34번째 줄: 34번째 줄:
{{#vardefine:조개수요|{{#expr:{{#var:사람}} + {{#var:반출조개}} }} }}
{{#vardefine:조개수요|{{#expr:{{#var:사람}} + {{#var:반출조개}} }} }}
{{#vardefine:초기노동력|{{#expr:{{#var:사람}} - {{#var:밀밭}} - 2 * {{#var:소}} }} }}
{{#vardefine:초기노동력|{{#expr:{{#var:사람}} - {{#var:밀밭}} - 2 * {{#var:소}} }} }}
{{#vardefine:노동력|{{예외|{{CGI2|변수=노동력|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|노동력}}|{{#var:초기노동력}}}}}}|정수}}}}{{#var:노동력}}
{{#vardefine:노동력|{{예외|{{CGI2|변수=노동력|기본값={{#ifexist:교역마을/계정/{{#username:}}|{{:교역마을/계정/{{#username:}}|노동력}}|{{#var:초기노동력}}}}}}|정수}}}}{{#ifexpr: {{#var:노동력}} < 0 ||<span class="error"></span>}}


{{#vardefine:식량자원|{{#expr:({{#var:밀}} >= {{#var:밀수요}}) + ({{#var:사과}} >= {{#var:사과수요}}) + ({{#var:소고기}} >= {{#var:소고기수요}}) + ({{#var:조개}} >= {{#var:조개수요}}) }}}}
{{#vardefine:식량자원|{{#expr:({{#var:밀}} >= {{#var:밀수요}}) + ({{#var:사과}} >= {{#var:사과수요}}) + ({{#var:소고기}} >= {{#var:소고기수요}}) + ({{#var:조개}} >= {{#var:조개수요}}) }}}}

2018년 3월 10일 (토) 09:04 판