Commit c8cc6ccc authored by gggg's avatar gggg

new

parent 86525386
No preview for this file type
--早见沙织的暴走
function c37573020.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,37573020+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c37573020.cost)
e1:SetTarget(c37573020.target)
e1:SetOperation(c37573020.activate)
c:RegisterEffect(e1)
end
function c37573020.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local player_type = Duel.GetRegistryValue("player_type_" .. tostring(tp))
local key = "opm_" .. player_type
if chk==0 then return not Duel.GetRegistryValue(key) end
Duel.SetRegistryValue(key, '1')
end
function c37573020.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c37573020.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.SendtoGrave(g,REASON_RULE)
end
\ No newline at end of file
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment