Commit 1fef3317 authored by nekrozar's avatar nekrozar

fix

parent 617547b8
--B・F・N --B・F・N
function c25221249.initial_effect(c) function c25221249.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
c:EnableCounterPermit(0x51) c:EnableCounterPermit(0x51)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -19,11 +20,11 @@ function c25221249.initial_effect(c) ...@@ -19,11 +20,11 @@ function c25221249.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to Grave --to Grave
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_SELF_TOGRAVE)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c25221249.tgcon) e3:SetCondition(c25221249.tgcon)
e3:SetOperation(c25221249.tgop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c25221249.condition(e,tp,eg,ep,ev,re,r,rp) function c25221249.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -34,7 +35,7 @@ function c25221249.filter(c,e,tp) ...@@ -34,7 +35,7 @@ function c25221249.filter(c,e,tp)
return c:IsSetCard(0x12f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x12f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c25221249.target(e,tp,eg,ep,ev,re,r,rp,chk) function c25221249.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():IsCanAddCounter(0x51,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c25221249.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c25221249.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end end
...@@ -49,9 +50,5 @@ function c25221249.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,9 +50,5 @@ function c25221249.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function c25221249.tgcon(e,tp,eg,ep,ev,re,r,rp) function c25221249.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetCounter(0x51)>=2 return Duel.GetCurrentPhase()==PHASE_END and c:GetCounter(0x51)>=2
end
function c25221249.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SendtoGrave(c,REASON_EFFECT)
end end
...@@ -37,17 +37,14 @@ function c26443791.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,17 +37,14 @@ function c26443791.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return g:GetCount()>0 end if chk==0 then return g:GetCount()>0 end
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c26443791.filter(c)
return c:IsFaceup()
end
function c26443791.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c26443791.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26443791.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end end
function c26443791.atkfilter(c) function c26443791.atkfilter(c)
return c:IsRace(RACE_INSECT) return c:IsFaceup() and c:IsRace(RACE_INSECT)
end end
function c26443791.atkop(e,tp,eg,ep,ev,re,r,rp) function c26443791.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c26443791.filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
local ct=Duel.GetMatchingGroupCount(c26443791.atkfilter,tp,LOCATION_REMOVED,0,nil) local ct=Duel.GetMatchingGroupCount(c26443791.atkfilter,tp,LOCATION_REMOVED,0,nil)
while tc do while tc do
...@@ -68,8 +65,8 @@ function c26443791.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,8 +65,8 @@ function c26443791.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c26443791.spfilter(c,e,tp,lv) function c26443791.spfilter(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsLevelBelow(11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsLevelBelow(11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c26443791.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c26443791.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
......
...@@ -36,12 +36,13 @@ function c27565379.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,12 +36,13 @@ function c27565379.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=re:GetHandler() local tc=re:GetHandler()
local atk=tc:GetBaseAttack() local atk=tc:GetBaseAttack()
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end end
function c27565379.damop(e,tp,eg,ep,ev,re,r,rp) function c27565379.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,d,REASON_EFFECT) local tc=re:GetHandler()
local atk=tc:GetBaseAttack()
Duel.Damage(p,atk,REASON_EFFECT)
end end
function c27565379.cfilter(c,tp) function c27565379.cfilter(c,tp)
if c:IsSetCard(0x12f) and c:GetPreviousControler()==tp then return true end if c:IsSetCard(0x12f) and c:GetPreviousControler()==tp then return true end
......
...@@ -9,6 +9,7 @@ function c33314479.initial_effect(c) ...@@ -9,6 +9,7 @@ function c33314479.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,33314479) e1:SetCountLimit(1,33314479)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c33314479.condition)
e1:SetCost(c33314479.cost) e1:SetCost(c33314479.cost)
e1:SetOperation(c33314479.operation) e1:SetOperation(c33314479.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -24,6 +25,9 @@ function c33314479.initial_effect(c) ...@@ -24,6 +25,9 @@ function c33314479.initial_effect(c)
e2:SetOperation(c33314479.spop) e2:SetOperation(c33314479.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c33314479.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c33314479.cfilter(c) function c33314479.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable()
end end
......
...@@ -17,7 +17,7 @@ end ...@@ -17,7 +17,7 @@ end
function c43528009.activate(e,tp,eg,ep,ev,re,r,rp) function c43528009.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(43528009,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(43528009,0))
local ag=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,2,2,nil) local ag=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,2,2,nil)
if ag:GetCount()>0 then if ag:GetCount()==2 then
Duel.SendtoHand(ag,1-tp,REASON_EFFECT) Duel.SendtoHand(ag,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,ag) Duel.ConfirmCards(tp,ag)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
......
...@@ -27,6 +27,7 @@ function c6203182.initial_effect(c) ...@@ -27,6 +27,7 @@ function c6203182.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c6203182.ctcon) e4:SetCondition(c6203182.ctcon)
e4:SetTarget(c6203182.cttg)
e4:SetOperation(c6203182.ctop) e4:SetOperation(c6203182.ctop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--destroy --destroy
...@@ -37,7 +38,7 @@ function c6203182.initial_effect(c) ...@@ -37,7 +38,7 @@ function c6203182.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c6203182.spfilter(c,e,tp) function c6203182.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end end
function c6203182.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c6203182.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c6203182.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c6203182.spfilter(chkc,e,tp) end
...@@ -84,12 +85,20 @@ function c6203182.ctcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,12 +85,20 @@ function c6203182.ctcon(e,tp,eg,ep,ev,re,r,rp)
local rc=ec:GetReasonCard() local rc=ec:GetReasonCard()
return rc and c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_MATERIAL) return rc and c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_MATERIAL)
and (ec:IsReason(REASON_FUSION) or ec:IsReason(REASON_SYNCHRO) or ec:IsReason(REASON_XYZ) or ec:IsReason(REASON_LINK)) and (ec:IsReason(REASON_FUSION) or ec:IsReason(REASON_SYNCHRO) or ec:IsReason(REASON_XYZ) or ec:IsReason(REASON_LINK))
and (rc:IsSummonType(SUMMON_TYPE_FUSION) or rc:IsSummonType(SUMMON_TYPE_SYNCHRO) or rc:IsSummonType(SUMMON_TYPE_XYZ) or rc:IsSummonType(SUMMON_TYPE_LINK))
end
function c6203182.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=c:GetPreviousEquipTarget()
local rc=ec:GetReasonCard()
if chk==0 then return rc:IsControlerCanBeChanged() end
rc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,rc,1,0,0)
end end
function c6203182.ctop(e,tp,eg,ep,ev,re,r,rp) function c6203182.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget() local ec=c:GetPreviousEquipTarget()
local rc=ec:GetReasonCard() local rc=ec:GetReasonCard()
if rc then if rc and rc:IsRelateToEffect(e) then
Duel.GetControl(rc,tp) Duel.GetControl(rc,tp)
end end
end end
......
...@@ -40,14 +40,14 @@ function c65899613.damfilter(c) ...@@ -40,14 +40,14 @@ function c65899613.damfilter(c)
return c:IsFaceup() and c:IsCode(65899613) return c:IsFaceup() and c:IsCode(65899613)
end end
function c65899613.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c65899613.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65899613.damfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c65899613.damfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local val=Duel.GetMatchingGroupCount(c65899613.damfilter,tp,LOCATION_MZONE,0,nil)*200 local val=Duel.GetMatchingGroupCount(c65899613.damfilter,tp,LOCATION_ONFIELD,0,nil)*200
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(val) Duel.SetTargetParam(val)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,val) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,val)
end end
function c65899613.damop(e,tp,eg,ep,ev,re,r,rp) function c65899613.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local val=Duel.GetMatchingGroupCount(c65899613.damfilter,tp,LOCATION_MZONE,0,nil)*200 local val=Duel.GetMatchingGroupCount(c65899613.damfilter,tp,LOCATION_ONFIELD,0,nil)*200
Duel.Damage(p,val,REASON_EFFECT) Duel.Damage(p,val,REASON_EFFECT)
end end
...@@ -114,12 +114,13 @@ function c66011101.operation3(e,tp,eg,ep,ev,re,r,rp) ...@@ -114,12 +114,13 @@ function c66011101.operation3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c66011101.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c66011101.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2) e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SKIP_BP) e2:SetCode(EFFECT_SKIP_BP)
...@@ -133,7 +134,6 @@ function c66011101.operation3(e,tp,eg,ep,ev,re,r,rp) ...@@ -133,7 +134,6 @@ function c66011101.operation3(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end end
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end
end end
function c66011101.skipcon(e) function c66011101.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel() return Duel.GetTurnCount()~=e:GetLabel()
......
...@@ -26,7 +26,7 @@ function c70709488.initial_effect(c) ...@@ -26,7 +26,7 @@ function c70709488.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c70709488.lcheck(g,lc) function c70709488.lcheck(g,lc)
return g:GetClassCount(Card.GetCode)==g:GetCount() return g:GetClassCount(Card.GetLinkCode)==g:GetCount()
end end
function c70709488.tgfilter(c) function c70709488.tgfilter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
......
...@@ -32,8 +32,10 @@ function c7925734.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,8 +32,10 @@ function c7925734.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED)
and c:IsRelateToEffect(e) then and c:IsRelateToEffect(e) then
if tc:IsType(TYPE_LINK) then if tc:IsType(TYPE_LINK) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
else else
Duel.BreakEffect()
if Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)~=0 then if Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)~=0 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end 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