Commit ece6d07a authored by Nemo Ma's avatar Nemo Ma

fix

parent e206a8df
......@@ -5,7 +5,7 @@ function c115025.initial_effect(c)
aux.EnablePendulumAttribute(c)
--XDestroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
......@@ -15,7 +15,7 @@ function c115025.initial_effect(c)
c:RegisterEffect(e2)
--SpecialSummon P
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_TOHAND)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,115026)
......@@ -57,7 +57,8 @@ function c115025.xdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c115025.xdop(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(e:GetHandler())
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetCountLimit(1)
......@@ -72,21 +73,22 @@ function c115025.xdop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c115025.atkcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetTurnCount()~=e:GetLabel() or Duel.IsAbleToEnterBP()) and Duel.GetTurnPlayer()==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
return (Duel.GetTurnCount()~=e:GetLabel() or Duel.IsAbleToEnterBP()) and Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
end
function c115025.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,115025)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(97453744,2))
if g:GetCount()>0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
......
......@@ -3,7 +3,6 @@ c115031.named_with_Arknight=1
function c115031.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(115031,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -14,9 +13,8 @@ function c115031.initial_effect(c)
e1:SetTarget(c115031.sptg2)
e1:SetOperation(c115031.spop2)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,115032)
......@@ -25,16 +23,6 @@ function c115031.initial_effect(c)
e2:SetOperation(c115031.spop)
c:RegisterEffect(e2)
end
function c115031.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c115031.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c115031.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
......
......@@ -24,7 +24,7 @@ function c115043.initial_effect(c)
c:RegisterEffect(e2)
--SpecialSummon P
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,115043)
......
......@@ -71,8 +71,12 @@ end
function cm.desfilter(c,e)
return c:IsSetCard(0xa001) and c:GetOriginalType()&TYPE_MONSTER and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsImmuneToEffect(e)
end
function cm.desfilter1(c,e,tp)
return c:IsSetCard(0xa001) and c:GetOriginalType()&TYPE_MONSTER and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetAttack())
function cm.desfilter3(c)
return c:IsSetCard(0xa001) and c:GetOriginalType()&TYPE_MONSTER and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function cm.fselect3(g,e,tp)
local atk=g:GetSum(Card.GetAttack)
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,atk)
end
function cm.desfilter2(c)
return c:IsLocation(LOCATION_MZONE) and Duel.GetMZoneCount(tp,c)>0
......@@ -85,7 +89,8 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then loc=LOCATION_MZONE end
return Duel.IsExistingMatchingCard(cm.desfilter1,tp,loc,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local g=Duel.GetMatchingGroup(cm.desfilter3,tp,loc,0,nil)
return #g>0 and g:CheckSubGroup(cm.fselect3,1,2,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA)
......
......@@ -71,7 +71,7 @@ function c15000065.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c15000065.desfilter,1,nil,tp)
end
function c15000065.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(e:GetHandlerPlayer(),c15000065.desfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,1,nil)
local g=Duel.SelectMatchingCard(e:GetHandlerPlayer(),c15000065.desfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,1,nil,e:GetHandlerPlayer())
if g:GetCount()~=0 then
Duel.Destroy(g,REASON_EFFECT)
Duel.BreakEffect()
......
This diff is collapsed.
......@@ -2,7 +2,7 @@ local m=25000080
local cm=_G["c"..m]
cm.name="ZGMF-X20A 强袭自由"
function cm.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1,1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......
......@@ -28,8 +28,8 @@ function c29065508.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function c29065508.xyzop(e,tp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x10ae,2,REASON_COST) and Duel.GetFlagEffect(tp,29065508)==0 end
Duel.RemoveCounter(tp,1,1,0x10ae,2,REASON_RULE)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x10ae,2,REASON_COST) and Duel.GetFlagEffect(tp,29065508)==0 end
Duel.RemoveCounter(tp,1,0,0x10ae,2,REASON_RULE)
Duel.RegisterFlagEffect(tp,29065508,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c29065508.discon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -28,8 +28,8 @@ function c29065509.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function c29065509.xyzop(e,tp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x10ae,2,REASON_COST) and Duel.GetFlagEffect(tp,29065509)==0 end
Duel.RemoveCounter(tp,1,1,0x10ae,2,REASON_RULE)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x10ae,2,REASON_COST) and Duel.GetFlagEffect(tp,29065509)==0 end
Duel.RemoveCounter(tp,1,0,0x10ae,2,REASON_RULE)
Duel.RegisterFlagEffect(tp,29065509,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c29065509.discon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -25,7 +25,6 @@ function c29065510.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_FZONE)
e2:SetOperation(c29065510.counter)
c:RegisterEffect(e2)
......@@ -59,11 +58,11 @@ function c29065510.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c29065510.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsType(TYPE_MONSTER)
function c29065510.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and (c:IsPreviousSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function c29065510.counter(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c29065510.cfilter,nil)
local ct=eg:FilterCount(c29065510.cfilter,nil,tp)
if ct>0 then
e:GetHandler():AddCounter(0x10ae,ct)
end
......
......@@ -17,7 +17,7 @@ function c33200911.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,33210911)
e2:SetCondition(c33200911.thcon)
......
......@@ -30,17 +30,22 @@ function cm.dscost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,nil)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetTarget(cm.distarget)
Duel.RegisterEffect(e2,tp)
end
function cm.distarget(e,c)
return c~=e:GetHandler() and c:IsType(TYPE_MONSTER)
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
......
--夏乡追忆 灯下烟火
function c67210103.initial_effect(c)
aux.EnablePendulumAttribute(c)
--setP
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67210103,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