Commit 420dc3c5 authored by argon.sun's avatar argon.sun

code

parent ee87255b
......@@ -670,20 +670,18 @@ void card::xyz_remove(card* mat) {
(*clit)->current.sequence = clit - xyz_materials.begin();
}
void card::apply_field_effect() {
effect_container::iterator it;
if (current.controler == PLAYER_NONE)
return;
for (it = field_effect.begin(); it != field_effect.end(); ++it) {
for (auto it = field_effect.begin(); it != field_effect.end(); ++it) {
if (current.location & it->second->range) {
pduel->game_field->add_effect(it->second);
}
}
}
void card::cancel_field_effect() {
effect_container::iterator it;
if (current.controler == PLAYER_NONE)
return;
for (it = field_effect.begin(); it != field_effect.end(); ++it) {
for (auto it = field_effect.begin(); it != field_effect.end(); ++it) {
if (current.location & it->second->range)
pduel->game_field->remove_effect(it->second);
}
......
--No.42 スターシップ・ギャラクシー・トマホーク(test)
function c20000011.initial_effect(c)
--No.42 スターシップ・ギャラクシー・トマホーク
function c10389142.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,7),2)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetDescription(aux.Stringid(20000011,0))
e1:SetDescription(aux.Stringid(10389142,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c20000011.spcost)
e1:SetTarget(c20000011.sptg)
e1:SetOperation(c20000011.spop)
e1:SetCost(c10389142.spcost)
e1:SetTarget(c10389142.sptg)
e1:SetOperation(c10389142.spop)
c:RegisterEffect(e1)
end
function c20000011.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
function c10389142.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -27,19 +27,19 @@ function c20000011.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c20000011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c10389142.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,20000012,0,0x4011,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,10389143,0,0x4011,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
end
function c20000011.spop(e,tp,eg,ep,ev,re,r,rp)
function c10389142.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,20000012,0,0x4011,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) then return end
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,10389143,0,0x4011,2000,0,6,RACE_MACHINE,ATTRIBUTE_WIND) then return end
local g=Group.CreateGroup()
for i=1,ft do
local token=Duel.CreateToken(tp,20000012)
local token=Duel.CreateToken(tp,10389143)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
g:AddCard(token)
end
......@@ -51,10 +51,10 @@ function c20000011.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(g)
e1:SetOperation(c20000011.desop)
e1:SetOperation(c10389142.desop)
Duel.RegisterEffect(e1,tp)
end
function c20000011.desop(e,tp,eg,ep,ev,re,r,rp)
function c10389142.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(Card.IsLocation,nil,LOCATION_MZONE)
g:DeleteGroup()
......
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