Commit 07ad4cbf authored by mercury233's avatar mercury233 Committed by GitHub

update Assault Mode Activate (#1128)

parent da8bf59f
...@@ -48,6 +48,8 @@ function c14553285.initial_effect(c) ...@@ -48,6 +48,8 @@ function c14553285.initial_effect(c)
e5:SetOperation(c14553285.spop) e5:SetOperation(c14553285.spop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c14553285.card_code_list={80280737}
c14553285.assault_name=31924889
function c14553285.addct(e,tp,eg,ep,ev,re,r,rp,chk) function c14553285.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x1) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x1)
......
...@@ -30,6 +30,8 @@ function c1764972.initial_effect(c) ...@@ -30,6 +30,8 @@ function c1764972.initial_effect(c)
e3:SetOperation(c1764972.spop2) e3:SetOperation(c1764972.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c1764972.card_code_list={80280737}
c1764972.assault_name=6021033
function c1764972.filter1(c,e,tp) function c1764972.filter1(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
......
...@@ -11,6 +11,7 @@ function c3431737.initial_effect(c) ...@@ -11,6 +11,7 @@ function c3431737.initial_effect(c)
e1:SetOperation(c3431737.operation) e1:SetOperation(c3431737.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c3431737.card_code_list={80280737}
function c3431737.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c3431737.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
......
...@@ -29,6 +29,8 @@ function c37169670.initial_effect(c) ...@@ -29,6 +29,8 @@ function c37169670.initial_effect(c)
e3:SetOperation(c37169670.spop) e3:SetOperation(c37169670.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c37169670.card_code_list={80280737}
c37169670.assault_name=95526884
function c37169670.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c37169670.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil end if chk==0 then return Duel.GetAttackTarget()~=nil end
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -37,6 +37,8 @@ function c38898779.initial_effect(c) ...@@ -37,6 +37,8 @@ function c38898779.initial_effect(c)
e4:SetOperation(c38898779.spop) e4:SetOperation(c38898779.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c38898779.card_code_list={80280737}
c38898779.assault_name=23693634
function c38898779.tgfilter(c) function c38898779.tgfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAbleToGrave() return c:IsRace(RACE_WARRIOR) and c:IsAbleToGrave()
end end
......
...@@ -12,6 +12,7 @@ function c40048324.initial_effect(c) ...@@ -12,6 +12,7 @@ function c40048324.initial_effect(c)
e1:SetOperation(c40048324.operation) e1:SetOperation(c40048324.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c40048324.card_code_list={80280737}
function c40048324.condition(e,tp,eg,ep,ev,re,r,rp) function c40048324.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end end
......
...@@ -10,3 +10,4 @@ function c49826746.initial_effect(c) ...@@ -10,3 +10,4 @@ function c49826746.initial_effect(c)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,80280737)) e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,80280737))
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c49826746.card_code_list={80280737}
...@@ -11,6 +11,7 @@ function c56252810.initial_effect(c) ...@@ -11,6 +11,7 @@ function c56252810.initial_effect(c)
e1:SetOperation(c56252810.activate) e1:SetOperation(c56252810.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c56252810.card_code_list={80280737}
function c56252810.cfilter(c) function c56252810.cfilter(c)
return c:IsCode(80280737) and c:IsAbleToRemoveAsCost() return c:IsCode(80280737) and c:IsAbleToRemoveAsCost()
end end
......
...@@ -44,6 +44,8 @@ function c61257789.initial_effect(c) ...@@ -44,6 +44,8 @@ function c61257789.initial_effect(c)
e4:SetOperation(c61257789.spop) e4:SetOperation(c61257789.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c61257789.card_code_list={80280737}
c61257789.assault_name=44508094
function c61257789.negcon(e,tp,eg,ep,ev,re,r,rp) function c61257789.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end end
......
...@@ -13,6 +13,7 @@ function c77036039.initial_effect(c) ...@@ -13,6 +13,7 @@ function c77036039.initial_effect(c)
e1:SetOperation(c77036039.operation) e1:SetOperation(c77036039.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c77036039.card_code_list={80280737}
function c77036039.cfilter(c) function c77036039.cfilter(c)
return c:IsCode(80280737) and c:IsAbleToDeckAsCost() return c:IsCode(80280737) and c:IsAbleToDeckAsCost()
end end
......
...@@ -30,6 +30,8 @@ function c77336644.initial_effect(c) ...@@ -30,6 +30,8 @@ function c77336644.initial_effect(c)
e3:SetOperation(c77336644.spop) e3:SetOperation(c77336644.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c77336644.card_code_list={80280737}
c77336644.assault_name=70902743
function c77336644.descon(e,tp,eg,ep,ev,re,r,rp) function c77336644.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler()
end end
......
...@@ -11,38 +11,32 @@ function c80280737.initial_effect(c) ...@@ -11,38 +11,32 @@ function c80280737.initial_effect(c)
e1:SetOperation(c80280737.activate) e1:SetOperation(c80280737.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c80280737.list={[44508094]=61257789,[70902743]=77336644,[6021033]=1764972,
[31924889]=14553285,[23693634]=38898779,[95526884]=37169670}
function c80280737.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c80280737.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
return true return true
end end
function c80280737.filter1(c,e,tp,ft) function c80280737.filter1(c,e,tp)
local code=c:GetCode() return c:IsType(TYPE_SYNCHRO) and Duel.GetMZoneCount(tp,c)>0
local tcode=c80280737.list[code] and Duel.IsExistingMatchingCard(c80280737.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
return tcode and c:IsType(TYPE_SYNCHRO) and (ft>0 or c:GetSequence()<5)
and Duel.IsExistingMatchingCard(c80280737.filter2,tp,LOCATION_DECK,0,1,nil,tcode,e,tp)
end end
function c80280737.filter2(c,tcode,e,tp) function c80280737.filter2(c,e,tp,tcode)
return c:IsCode(tcode) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0x104f) and c.assault_name==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function c80280737.target(e,tp,eg,ep,ev,re,r,rp,chk) function c80280737.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then if chk==0 then
if e:GetLabel()~=1 then return false end if e:GetLabel()~=1 then return false end
e:SetLabel(0) e:SetLabel(0)
return ft>-1 and Duel.CheckReleaseGroup(tp,c80280737.filter1,1,nil,e,tp,ft) return Duel.CheckReleaseGroup(tp,c80280737.filter1,1,nil,e,tp)
end end
local rg=Duel.SelectReleaseGroup(tp,c80280737.filter1,1,1,nil,e,tp,ft) local rg=Duel.SelectReleaseGroup(tp,c80280737.filter1,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetCode()) e:SetLabel(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c80280737.activate(e,tp,eg,ep,ev,re,r,rp) function c80280737.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local code=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tcode=c80280737.list[code] local tc=Duel.SelectMatchingCard(tp,c80280737.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()):GetFirst()
local tc=Duel.GetFirstMatchingCard(c80280737.filter2,tp,LOCATION_DECK,0,nil,tcode,e,tp)
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_ATTACK)>0 then if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_ATTACK)>0 then
tc:CompleteProcedure() tc:CompleteProcedure()
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