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