-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTrapCardInstance.adept
34 lines (27 loc) · 962 Bytes
/
TrapCardInstance.adept
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
import 'main.adept'
struct TrapCardInstance (struct CardInstance, rigged CardNetworkID) {
func asCardInstance *CardInstance = this as *CardInstance
func __assign__(other TrapCardInstance) {
*this.asCardInstance() = *other.asCardInstance()
this.rigged = other.rigged
}
verbatim func __defer__ {
this.asCardInstance().__defer__()
}
}
verbatim func __pass__(trap POD TrapCardInstance) TrapCardInstance {
*trap.asCardInstance() = __pass__(*trap.asCardInstance())
return trap
}
func trapCardInstance(card_instance CardInstance, rigged CardNetworkID) TrapCardInstance {
trap POD TrapCardInstance
*trap.asCardInstance() = card_instance
trap.rigged = rigged
return trap
}
func trapCardInstance(blueprint *CardBlueprint, rigged CardNetworkID) TrapCardInstance {
trap POD TrapCardInstance
*trap.asCardInstance() = cardInstance(blueprint)
trap.rigged = rigged
return trap
}