Index: script/c0.lua ================================================================== --- script/c0.lua +++ script/c0.lua @@ -240,75 +240,62 @@ fun["开局添加手卡"] = function(str_1) --{ str["开局添加手卡"] = str_1 ---~ effect_1 = Effect.GlobalEffect() ---~ ---~ effect_1:SetType(EFFECT_TYPE_FIELD ---~ + EFFECT_TYPE_CONTINUOUS) ---~ ---~ effect_1:SetCode(EVENT_ADJUST) ---~ ---~ effect_1:SetCountLimit(1) ---~ ---~ function cache_1() --{ ---~ ---~ if str["已添加手卡"] == 1 then --{ ---~ ---~ return false ---~ ---~ --} ---~ ---~ else --{ ---~ ---~ str["已添加手卡"] = 1 ---~ ---~ return true ---~ ---~ end --} ---~ ---~ end--} ---~ ---~ effect_1:SetCondition(cache_1) ---~ ---~ function cache_1(effect_event ---~ , player_who_activate_the_effect) --{ ---~ ---~ str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect ---~ , Card.IsAbleToHand ---~ , player_who_activate_the_effect ---~ , LOCATION_DECK ---~ , 0 ---~ , str_1 ---~ , str_1 ---~ , nil) ---~ ---~ Duel.SendtoHand(str["玩家选定的卡"] ---~ , nil ---~ , REASON_RULE) ---~ ---~ end --} ---~ ---~ effect_1:SetOperation(cache_1) ---~ ---~ Duel.RegisterEffect(effect_1 ---~ , 0) - - str["玩家选定的卡"] = Duel.SelectMatchingCard(0 + effect_1 = Effect.GlobalEffect() + + effect_1:SetType(EFFECT_TYPE_FIELD + + EFFECT_TYPE_CONTINUOUS) + + effect_1:SetCode(EVENT_ADJUST) + + effect_1:SetCountLimit(1) + + function cache_1() --{ + + if str["已添加手卡"] == 1 then --{ + + return false + + --} + + else --{ + + str["已添加手卡"] = 1 + + return true + + end --} + + end--} + + effect_1:SetCondition(cache_1) + + function cache_1(effect_event + , player_who_activate_the_effect) --{ + + str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect , Card.IsAbleToHand - , 0 + , player_who_activate_the_effect , LOCATION_DECK , 0 , str_1 , str_1 , nil) Duel.SendtoHand(str["玩家选定的卡"] , nil , REASON_RULE) + + end --} + + effect_1:SetOperation(cache_1) + Duel.RegisterEffect(effect_1 + , 0) + end --} fun["禁格"] = function(str_1) --{ str["禁格"] = str_1