-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.txt
More file actions
78 lines (64 loc) · 1.9 KB
/
Copy pathtest.txt
File metadata and controls
78 lines (64 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Deploy[self]
boost(5)
Deploy[allie,'Soldier']
inGrave()?
jumpTo(allieRows)
部署[自身]
增益(5)
部署[友方, '士兵']
在墓场中?
召唤(友方排)
Deploy[self]
deck[ally].boost(1)
#hand[ally] <= 3?
addStatus(immune)
Command[self]
v = 0
for deck[ally] as card
v += card.reset(power)
boost(v)
damageAmounts = []
WeatherTrigger[enemy, "frost"]
#damageAmounts >= 5?
damageAmounts.pop(0)
damageAmounts += event.amount
TurnStart[ally]
boost(damageAmounts)
基础操作:
赋值:=
运算赋值:+=, -=, *=, /=
运算符:+, -, *, /, ^
逻辑运算符:==, !=, ~=(同名牌), >=, <=
数据类型:
int, float, bool, None
数据结构:
List
的函数
insert, pop,
流程控制:
?, ?!, !, for, range, as, break, continue
选择器(传给前端让它选择一个):
choose num from place where filter as var
num: int,一个整数
place: array,一个数组(列表)
filter: (可选)新增的类型,相当于python的listname.filter(lambda e: e.power>5 and e.color==bronze)
var: 你想要给选出来的卡叫什么
# 从手牌选 1 张战力>5 的铜色单位,给它+3
choose 1 from hand[ally] where (.power>5 and .color==bronze) as target:
boost(target, 3)
# 从战场上选 3 张人口大于10 的大金,消灭
choose 3 from deck[ally] where (.power>5 and .color==bronze) as target:
boost(target, 3)
IO:
print
内置函数/常量/变量:
boost, damage, onBattleGround, inGrave, inDeck, addStatus,
destroy, banish, reset, getPower, getBasePower, getArmor, getCommand,
setCommand, getCount, setCount, getTimer, setTimer, getPos, jumpTo,
create, random, reveal, duel, clash, consume, drain, infuse, addWeather, clearWeather,
flip, getCoins, setCoins, originalDeck, deck, grave, round, turn, allTurn
订阅函数
Deploy, WeatherTrigger etc.
def Deploy_1(event):
event.filter(self)
self.boost(5)