Commit 1fef3317 authored by nekrozar's avatar nekrozar

fix

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