Commit e1d05595 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 0536e43b
Pipeline #538 passed with stages
in 42 minutes and 16 seconds
No preview for this file type
......@@ -28,6 +28,7 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1)
e3:SetCondition(cm.effcon)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
......@@ -38,6 +39,7 @@ function cm.initial_effect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetCountLimit(1)
e4:SetCondition(cm.condition)
e4:SetCost(cm.cost)
e4:SetOperation(cm.neop)
......
......@@ -40,7 +40,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.matcheck(e,c)
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_DARK) then
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_DARK):GetCount()~=0 then
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -52,9 +52,9 @@ function cm.matcheck(e,c)
e1:SetOperation(cm.atkop2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,0))
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,0))
end
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_LIGHT) then
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_LIGHT):GetCount()~=0 then
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
......@@ -69,7 +69,7 @@ function cm.matcheck(e,c)
c:RegisterEffect(e2)
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,1))
end
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_WIND) then
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_WIND):GetCount()~=0 then
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
......@@ -84,7 +84,7 @@ function cm.matcheck(e,c)
c:RegisterEffect(e1)
c:RegisterFlagEffect(m+2,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,2))
end
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_WATER) then
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_WATER):GetCount()~=0 then
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
......@@ -100,7 +100,7 @@ function cm.matcheck(e,c)
c:RegisterEffect(e2)
c:RegisterFlagEffect(m+3,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,3))
end
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_FIRE) then
if c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_FIRE):GetCount()~=0 then
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,4))
......@@ -203,7 +203,6 @@ function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil,0x1015,2)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()~=0 then
local tc=g:GetFirst()
......
......@@ -84,6 +84,13 @@ function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsType(TYPE_FIELD) and tc:IsPreviousLocation(LOCATION_FZONE) then
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
elseif tc:IsType(TYPE_PENDULUM) and tc:IsPreviousLocation(LOCATION_PZONE) then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
else
Duel.ReturnToField(e:GetLabelObject())
end
Duel.ReturnToField(tc)
end
......
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