Commit 8fa49486 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent d8e3a4a1
......@@ -22,11 +22,11 @@ function c65071030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac)
e:GetHandler():RegisterFlagEffect(65071030,RESET_EVENT+0x1fe0000,0,1,ac)
e:SetLabel(ac)
end
function c65071030.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetFlagEffectLabel(65071030)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local ct=e:GetLabel()
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ct/2)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct/2)
......@@ -38,16 +38,13 @@ function c65071030.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
else
local ct=e:GetHandler():GetFlagEffectLabel(65071030)
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
local sg=g:Filter(c65071030.tgfil,nil,e)
local sg=Duel.GetMatchingGroup(c65071030.tgfil,0,LOCATION_MZONE,e:GetLabel())
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
function c65071030.tgfil(c,e)
local ct=e:GetHandler():GetFlagEffectLabel(65071030)
return c:GetAttack()<=ct/2
function c65071030.tgfil(c,ct)
return c:GetAttack()<=ct/2 and c:IsFaceup()
end
......@@ -19,23 +19,14 @@ function c75646135.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,756461)
e2:SetCountLimit(1,5646135)
e2:SetCost(c75646135.thcost)
e2:SetTarget(c75646135.thtg)
e2:SetOperation(c75646135.thop)
c:RegisterEffect(e2)
end
function c75646135.chkfilter1(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevelBelow(4) and
not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,tp,c)
and Duel.IsExistingMatchingCard(c75646135.chkfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c75646135.chkfilter2(c,e,tp,cd)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevelBelow(4) and not c:IsCode(cd)
and not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,1-tp,c)
end
function c75646135.filter1(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,tp)
and Duel.IsExistingMatchingCard(c75646135.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c75646135.filter2(c,e,tp,cd)
......@@ -46,14 +37,13 @@ function c75646135.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75646135.chkfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c75646135.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c75646135.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c75646135.filter1,tp,LOCATION_DECK,0,nil,e,tp)
if sg:GetCount()>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(75646135,0))
local g1=sg:Select(tp,1,1,nil)
local tc1=g1:GetFirst()
......
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