Commit 986d2157 authored by mercury233's avatar mercury233

fix

parent ea62cddf
......@@ -7,6 +7,7 @@ function c100200164.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100200164+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100200164.target)
e1:SetOperation(c100200164.activate)
c:RegisterEffect(e1)
......
......@@ -25,24 +25,30 @@ end
function c100248004.filter(c)
return c:IsFaceup()
end
function c100248004.desfilter(c)
return c:IsFaceup() and c:IsAttackAbove(2500)
end
function c100248004.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100248004.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c100248004.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100248004.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c100248004.filter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
local dg=Group.CreateGroup()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(600)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if tc:IsAttackAbove(2500) then dg:AddCard(tc) end
tc=g:GetNext()
end
local dg=Duel.GetMatchingGroup(c100248004.desfilter,tp,0,LOCATION_MZONE,nil)
if dg:GetCount()>0 then
Duel.BreakEffect()
local ct=Duel.Destroy(dg,REASON_EFFECT)
......
......@@ -24,6 +24,7 @@ function c100248042.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c100248042.spcon)
e3:SetTarget(c100248042.sptg)
......@@ -45,7 +46,7 @@ function c100248042.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100248042.filter,tp,0,LOCATION_MZONE,1,nil) end
end
function c100248042.atkfilter(c)
return c:IsRace(RACE_INSECT) and c:IsType(TYPE_MONSTER)
return c:IsRace(RACE_INSECT)
end
function c100248042.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100248042.filter,tp,0,LOCATION_MZONE,nil)
......@@ -67,7 +68,7 @@ function c100248042.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c100248042.spfilter(c,e,tp,lv)
return c:IsRace(RACE_INSECT) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsRace(RACE_INSECT) and c:IsLevelBelow(11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100248042.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
......@@ -79,7 +80,7 @@ function c100248042.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100248042.spfilter),tp,LOCATION_REMOVED,0,3,3,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c100248042.spfilter,tp,LOCATION_REMOVED,0,3,3,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -5,7 +5,7 @@ function c100250007.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100250007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100250007)
......@@ -38,8 +38,9 @@ function c100250007.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsType(TYPE_LINK) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
......@@ -57,7 +57,15 @@ function c100250009.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100250009.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
......@@ -7,6 +7,7 @@ function c100336024.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100336024+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100336024.target)
e1:SetOperation(c100336024.activate)
c:RegisterEffect(e1)
......
......@@ -8,13 +8,13 @@ function c100336051.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100336051,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100336051)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetTarget(c100336051.destg)
e1:SetOperation(c100336051.desop)
c:RegisterEffect(e1)
......
......@@ -24,20 +24,21 @@ function c100336052.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c100336052.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c100336052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100336052.spfilter(c,e,tp)
return c:IsSetCard(0x102) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100336052.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsType(TYPE_LINK) then
local ct=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),tc:GetLink())
local ct=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),tc:GetLink())
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100336052.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
......
......@@ -8,6 +8,7 @@ function c101008000.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101008000)
e1:SetCondition(c101008000.condition)
e1:SetCost(c101008000.cost)
e1:SetTarget(c101008000.target)
......@@ -18,7 +19,7 @@ function c101008000.cfilter(c,tp)
return c:GetSummonPlayer()==1-tp
end
function c101008000.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101008000.cfilter,1,nil,tp) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
return eg:IsExists(c101008000.cfilter,1,nil,tp) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
end
function c101008000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
......@@ -36,7 +37,7 @@ end
function c101008000.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......
......@@ -18,7 +18,7 @@ function c101008083.cfilter(c)
end
function c101008083.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101008083.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c101008083.cfilter,1,1,REASON_COST)
Duel.DiscardHand(tp,c101008083.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c101008083.thfilter(c)
return c:IsLevelBelow(4) and c:IsSetCard(0x11e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
......@@ -7,7 +7,7 @@ function c101008085.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,101008085+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101008085.target)
e1:SetOperation(c101008085.activate)
......
......@@ -6,6 +6,7 @@ function c101008087.initial_effect(c)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c101008087.atkcon)
e1:SetOperation(c101008087.atkop)
......
......@@ -44,11 +44,12 @@ function c101008089.rmcon(e,tp,eg,ep,ev,re,r,rp)
and not Duel.IsExistingMatchingCard(c101008089.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end
function c101008089.rmfilter(c)
return c:IsFaceup() and c:IsSetCard(0x122) and c:IsPosition(POS_ATTACK)
return c:IsFaceup() and c:IsSetCard(0x122) and c:IsPosition(POS_FACEUP_ATTACK)
end
function c101008089.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101008089.rmfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c101008089.rmfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
Duel.SelectTarget(tp,c101008089.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
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