Lines of
残局函数库/残局函数库.lua
from check-in 1ccfd2b4b5
that are changed by the sequence of edits moving toward
check-in 1759c92880:
1:
2: local str = {}
3: local fun = {}
4:
5: local cache_1
6: local cache_2
7:
8: fun["通关邀请"] = function()
9: local effect_1
10: effect_1 = Effect.GlobalEffect()
11: effect_1:SetType(EFFECT_TYPE_FIELD
12: + EFFECT_TYPE_CONTINUOUS)
13: effect_1:SetCode(EVENT_DAMAGE)
14: function cache_1()
1ccfd2b4b5 2023-06-26 15:
16: cache_1 = Duel.GetLP(1)
1ccfd2b4b5 2023-06-26 17:
18: if cache_1 <= 0 then
19: cache_1 = true
20: else
21: cache_1 = false
22: end
1ccfd2b4b5 2023-06-26 23:
24: return cache_1
25: end
26: effect_1:SetCondition(cache_1)
27: function cache_1()
28: Debug.ShowHint("残局群181175613")
29: return
30: end
31: effect_1:SetOperation(cache_1)
32: Duel.RegisterEffect(effect_1
33: , 0)
34: end
35:
36: fun["开局添加手卡"] = function(str_1)
37: local effect_1
38: effect_1 = Effect.GlobalEffect()
39: effect_1:SetType(EFFECT_TYPE_FIELD
40: + EFFECT_TYPE_CONTINUOUS)
41: effect_1:SetCode(EVENT_ADJUST)
42: effect_1:SetCountLimit(1)
43: function cache_1()
1ccfd2b4b5 2023-06-26 44: --~ cache_1 = Duel.GetLP(0)
1ccfd2b4b5 2023-06-26 45: --~ if cache_1 > 0 then
1ccfd2b4b5 2023-06-26 46: --~ cache_1 = true
1ccfd2b4b5 2023-06-26 47: --~ else
1ccfd2b4b5 2023-06-26 48: --~ cache_1 = false
1ccfd2b4b5 2023-06-26 49: --~ end
50: return true
51: end
52: effect_1:SetCondition(cache_1)
53: function cache_1(effect_event
54: , player_who_activate_the_effect)
55: str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
56: , Card.IsAbleToHand
57: , player_who_activate_the_effect
58: , LOCATION_DECK
59: , 0
60: , str_1
61: , str_1
62: , nil)
63: Duel.SendtoHand(str["玩家选定的卡"]
64: , nil
65: , REASON_RULE)
66: end
67: effect_1:SetOperation(cache_1)
68: Duel.RegisterEffect(effect_1
69: , 0)
70: end
71:
72: fun["通关邀请"]()
73: fun["开局添加手卡"](1)
74: