-
Notifications
You must be signed in to change notification settings - Fork 1
Rules cards
-
nは整数(関数だとerror)
-
iはスロット番号(0~255以外の整数、あるいは関数だとerror)
-
f g などは関数(整数だとerror、但し高階関数の場合はerror発生のタイミングは後になる)
-
x y はなんでもおk
"return x" 恒等写像 (λx.x)
"return 0" 0
"m <- n + 1; return m" 整数nを受け取り、n<65535の場合はn+1を、65535の場合は65535を返す。nが整数でなければerror。
"m <- n * 2; return m" 整数nを受け取り、n<32768の場合はn*2を、それ以外の整数の場合は65535を返す。nが整数でなければerror。
"y <- f[i]; return y" i番目のslotのvalueを返す(aliveの場合)。iがvalid slot numberではない場合、またはslotがdeadの場合error。
"return id" 引数を捨てて恒等写像を返す。
"h <- f x; y <- g x; z <- h y; return z" Sコンビネータ。λf.λg.λx.fx(gx)。errorの発生は、S f g x まで引数が揃ってfx(gx)が評価される時(NOT S fとかの部分適用時には値はチェックされない)
"return x" Kコンビネータ。
"v[i] <- v[i] + 1; return I" i番目の自分のスロットのvitalityを1増やす(1~65534の場合)。-1,0,65535の場合は何もしない。iがvalid slot numberではない場合error。恒等関数を返す。
"v'[255-i] <- v'[255-i] - 1; return I" 敵の255-i番目のslotのvitalityを1減らす(1~65535の場合)。-1,0の場合は何もしない。iがvalid slot numberではない場合error。恒等関数を返す。
"v[i] <- v[i] - n; v'[255-j] <- v'[255-j] - n * 9 / 10; return I" errorは attack i j n が全て揃った後で発生する (NOT 部分適用時)。
-
iがvalid slot numberではない、 nが整数ではない、nがi番目のスロットのvitalityより真に大きい場合エラー
-
jがvalid slot numberではない場合はerror。相手の255-j番目のslotがaliveの場合、vitalityをn*9/10(切捨て)減らす(0以下になったら0)。deadだったら何もしない。
-
恒等関数を返す。
"v[i] <- v[i] - n; v[j] <- v[j] + n * 11 / 10; return I"
-
iがvalid slot numberではない、nが整数ではない、nが自分のi番目のスロットのvitalityより大きい、ならばerror
-
自分のi番目のスロットのvitalityをn減らす
-
jがvalid slot numberでなければerror、自分のj番目のスロットのがaliveならvitalityをn*11/10(切捨て)増やす(65535を超えたら65535)、deadなら何もしない
-
恒等関数を返す
"y <- f'[i]; return y" 相手のi番目のfieldを返す。iがvalid slot numberでなければerror。(255-i)番目じゃないよ!
- copyで盗めるのはカードの効果ではなく値。つまり相手からreviveをコピーして発動した場合、相手じゃなく自分のスロットが蘇生する。 [June 17, 2011 3:45 PM のコメントより。]
- copyは相手の死んでいるスロットからもフィールドを盗める。[June 18, 2011 1:07 AM]
"v[i] <- 1; return I" i番目のvitalityを1にする(0以下の場合)。1以上なら何もしない。恒等写像を返す。iがvalid slot numberならerror。
"f'[255-i] <- x; v'[255-i] <- -1; return I" 相手の(255-i)番目のslotがdeadなら、xで上書きし、vitalityを-1にして、恒等関数を返す。iがvalid slot numberでないか、aliveだったらerror。
各プレイヤーの1ターンの直前に、そのプレイヤーのフィールドの、バイタリティが-1のスロットのフィールドは、(スロット番号の昇順に)自動的にidに適用される。これらの自動的用において、「フィールドが関数でない」「関数適用の階数が1000を超えた」場合にはエラーが投げられる。自動適用で起動したエラーは、ほかの自動実行に影響を及ぼさない。自動実行のあと、スロットのフィールドはidで上書きされ、スロットのバイタリティは0にされる。
Immediately before each turn of a player, the field of every slot of the player with vitality -1 is automatically applied (as a function) to the identity function (even though the slot is dead) in increasing order of slot number. For each of these automatic applications, an error is raised if the field is not a function or the number of function applications caused by the application exceeds 1000. An error caused by each automatic application does not affect any other automatic applications. After each automatic application, the field of the slot used for the application is overwritten with the identity function, and the vitality of the slot is reset to 0.
それに加え、上記の自動実行の間、4種のカードの効果の一部が、以下のように変更される。
In addition, during the above automatic applications, parts of the effects of 4 cards change from their previous descriptions as follows (the other parts do not change from the original):
-
inc iは、v[i]<-v[i]-1になる。
-
dec iは、v'[i]<-v'[i]+1になる。
-
attack i j nは"v[i] <- v[i] - n; v'[255-j] <- v'[255-j] + n * 9 / 10; return I" になる(自分を削って相手を回復)
-
help i j nは"v[i] <- v[i] - n; v[j] <- v[j] - n * 11 / 10; return I"になる(自分の2つのスロットにダメージ)
-
Card "inc" decreases the v (in the previous description of this card) by 1 if v>0, or does nothing if v<=0.
-
Card "dec" increases the v by 1 if v>0 and v<65535, or does nothing if v<=0 or v=65535.
-
The third function in card "attack" increases the w by n*9/10 if w>0 (w is set to 65535 if it would become greater than 65535 by this increase), or does nothing if w<=0.
-
The third function in card "help" decreases the w by n*11/10 if w>0 (w is set to 0 if it would become less than 0 by this decrease), or does nothing if w<=0.