Commit 8ef0f3b4 authored by mercury233's avatar mercury233

fix

parent 684b54f0
......@@ -14,8 +14,8 @@ function c100416038.initial_effect(c)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(100416038)
e2:SetCountLimit(1)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x261))
e2:SetTargetRange(1,0)
e2:SetTarget(c100416038.repfilter)
e2:SetTargetRange(LOCATION_GRAVE,0)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
......@@ -39,6 +39,9 @@ function c100416038.initial_effect(c)
e4:SetOperation(c100416038.tkcop)
c:RegisterEffect(e4)
end
function c100416038.repfilter(e,c)
return c:IsLevelAbove(7) and c:IsSetCard(0x261)
end
function c100416038.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x60,1)
end
......
......@@ -46,13 +46,18 @@ end
function c100416039.mnfilter2(c,mc,lv)
return c:GetLevel()-mc:GetLevel()==lv
end
function c100416039.spfilter(c,e,tp,g,lv)
function c100416039.spfilter(c,e,tp,g)
return c:IsSetCard(0x261) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
and (not g and c:IsLevel(lv) or g:IsExists(c100416039.mnfilter,1,nil,g,c:GetLevel()))
end
function c100416039.spfilter1(c,e,tp,g)
return c100416039.spfilter(c,e,tp,g) and g:IsExists(c100416039.mnfilter,1,nil,g,c:GetLevel())
end
function c100416039.spfilter2(c,e,tp,lv)
return c100416039.spfilter(c,e,tp,nil) and c:IsLevel(lv)
end
function c100416039.fselect(g,e,tp)
return g:GetCount()==2 and g:IsExists(Card.IsType,1,nil,TYPE_TUNER) and g:IsExists(aux.NOT(Card.IsType),1,nil,TYPE_TUNER)
and Duel.IsExistingMatchingCard(c100416039.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
and Duel.IsExistingMatchingCard(c100416039.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end
function c100416039.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c100416039.thfilter,tp,LOCATION_GRAVE,0,1,nil)
......@@ -97,7 +102,7 @@ function c100416039.activate(e,tp,eg,ep,ev,re,r,rp)
local lv=c1:GetLevel()-c2:GetLevel()
if lv<0 then lv=-lv end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c100416039.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil,lv)
local sg=Duel.SelectMatchingCard(tp,c100416039.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
......
......@@ -71,7 +71,7 @@ function c101103000.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101103000.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x263)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_WARRIOR)
and c:IsControler(tp) and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c101103000.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -95,7 +95,7 @@ function c101103087.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
if not tc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(tc)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
......
......@@ -27,7 +27,7 @@ function c101103094.initial_effect(c)
c:RegisterEffect(e2)
end
function c101103094.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x263) and c:IsControler(tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsControler(tp)
end
function c101103094.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103094.cfilter,1,nil,tp)
......
......@@ -32,7 +32,7 @@ function c101103095.ntcon(e,c,minc)
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(c101103095.cfilter,tp,LOCATION_MZONE,0,1,nil))
end
function c101103095.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsAbleToGrave() and not c:IsCode(101103095)
end
function c101103095.check(c,tp)
return c and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR)
......
......@@ -30,19 +30,19 @@ function c101103098.drcon(e,tp,eg,ep,ev,re,r,rp)
end
function c101103098.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
if chk==0 then return true end
end
function c101103098.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()==0 then
e:SetLabel(0)
return Duel.IsPlayerCanDraw(tp,1) and e:GetHandler():IsCanRemoveCounter(tp,0x61,1,REASON_COST)
else return false end
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsPlayerCanDraw(tp,1) and c:IsCanRemoveCounter(tp,0x61,1,REASON_COST)
end
e:SetLabel(0)
e:GetHandler():RemoveCounter(tp,0x61,1,REASON_COST)
if e:GetHandler():GetCounter(0x61)==0 then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
c:RemoveCounter(tp,0x61,1,REASON_COST)
if c:GetCounter(0x61)==0 then
Duel.SendtoGrave(c,REASON_EFFECT)
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
......
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