Commit c5276bc3 authored by mercury233's avatar mercury233

fix

parent 58034414
...@@ -13,7 +13,7 @@ function c100200200.initial_effect(c) ...@@ -13,7 +13,7 @@ function c100200200.initial_effect(c)
e1:SetOperation(c100200200.spop) e1:SetOperation(c100200200.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot be target for attacks --cannot be target for attacks
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -21,12 +21,12 @@ function c100200200.initial_effect(c) ...@@ -21,12 +21,12 @@ function c100200200.initial_effect(c)
e2:SetValue(c100200200.atlimit) e2:SetValue(c100200200.atlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--burial --burial
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100200200,1)) e3:SetDescription(aux.Stringid(100200200,1))
e3:SetCategory(CATEGORY_TOGRAVE) e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,100200200+100) e3:SetCountLimit(1,100200200+100)
e3:SetCondition(c100200200.tgcon) e3:SetCondition(c100200200.tgcon)
e3:SetTarget(c100200200.tgtg) e3:SetTarget(c100200200.tgtg)
...@@ -56,7 +56,7 @@ function c100200200.tgcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c100200200.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c100200200.tgfilter(c) function c100200200.tgfilter(c)
return c:IsRace(RACE_WINDBEAST) and c:IsAbleToGrave() return c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToGrave()
end end
function c100200200.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100200200.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200200.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100200200.tgfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -82,7 +82,7 @@ end ...@@ -82,7 +82,7 @@ end
function c100274201.spcon(e,tp,eg,ep,ev,re,r,rp) function c100274201.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetOverlayCount()>0 and c:IsPreviousLocation(LOCATION_MZONE) return c:GetOverlayCount()>0 and c:IsPreviousLocation(LOCATION_MZONE)
and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)
end end
function c100274201.spfilter(c,e,tp) function c100274201.spfilter(c,e,tp)
return c:IsCode(100274202) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(100274202) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -22,7 +22,7 @@ function c100274203.initial_effect(c) ...@@ -22,7 +22,7 @@ function c100274203.initial_effect(c)
end end
end end
function c100274203.cfilter(c) function c100274203.cfilter(c)
return c:GetPreviousLocation()&LOCATION_ONFIELD>0 and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==79747096 return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==79747096
and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():IsActiveType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():IsActiveType(TYPE_MONSTER)
end end
function c100274203.checkop(e,tp,eg,ep,ev,re,r,rp) function c100274203.checkop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -11,7 +11,7 @@ function c100278001.initial_effect(c) ...@@ -11,7 +11,7 @@ function c100278001.initial_effect(c)
e1:SetCountLimit(1,100278001) e1:SetCountLimit(1,100278001)
e1:SetTarget(c100278001.sptg) e1:SetTarget(c100278001.sptg)
e1:SetOperation(c100278001.spop) e1:SetOperation(c100278001.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
......
...@@ -11,7 +11,7 @@ function c100278002.initial_effect(c) ...@@ -11,7 +11,7 @@ function c100278002.initial_effect(c)
e1:SetCountLimit(1,100278002) e1:SetCountLimit(1,100278002)
e1:SetTarget(c100278002.thtg) e1:SetTarget(c100278002.thtg)
e1:SetOperation(c100278002.thop) e1:SetOperation(c100278002.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
......
--クリブー --クリブー
--Script by REIKAI --Script by REIKAI
function c100278003.initial_effect(c) function c100278003.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278003,0)) e1:SetDescription(aux.Stringid(100278003,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
--Script by REIKAI --Script by REIKAI
function c100278004.initial_effect(c) function c100278004.initial_effect(c)
aux.AddCodeList(c,40640057) aux.AddCodeList(c,40640057)
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278004,0)) e1:SetDescription(aux.Stringid(100278004,0))
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
...@@ -15,7 +15,7 @@ function c100278004.initial_effect(c) ...@@ -15,7 +15,7 @@ function c100278004.initial_effect(c)
e1:SetCost(c100278004.atkcost) e1:SetCost(c100278004.atkcost)
e1:SetTarget(c100278004.atktg) e1:SetTarget(c100278004.atktg)
e1:SetOperation(c100278004.atkop) e1:SetOperation(c100278004.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278004,1)) e3:SetDescription(aux.Stringid(100278004,1))
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
function c100278005.initial_effect(c) function c100278005.initial_effect(c)
aux.AddCodeList(c,40640057) aux.AddCodeList(c,40640057)
--special summon itself --special summon itself
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278005,0)) e1:SetDescription(aux.Stringid(100278005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100278005) e1:SetCountLimit(1,100278005)
e1:SetCondition(c100278005.spcon1) e1:SetCondition(c100278005.spcon1)
e1:SetTarget(c100278005.sptg1) e1:SetTarget(c100278005.sptg1)
...@@ -21,16 +21,16 @@ function c100278005.initial_effect(c) ...@@ -21,16 +21,16 @@ function c100278005.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetValue(c100278005.atkval) e2:SetValue(c100278005.atkval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon from grave --special summon from grave
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100278005,1)) e4:SetDescription(aux.Stringid(100278005,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100278005) e4:SetCountLimit(1,100278005)
e4:SetCondition(c100278005.spcon2) e4:SetCondition(c100278005.spcon2)
e4:SetTarget(c100278005.sptg2) e4:SetTarget(c100278005.sptg2)
......
...@@ -11,19 +11,19 @@ function c100278041.initial_effect(c) ...@@ -11,19 +11,19 @@ function c100278041.initial_effect(c)
e1:SetOperation(c100278041.activate) e1:SetOperation(c100278041.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy replace --destroy replace
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c100278041.reptg) e2:SetTarget(c100278041.reptg)
e2:SetValue(c100278041.repval) e2:SetValue(c100278041.repval)
e2:SetOperation(c100278041.repop) e2:SetOperation(c100278041.repop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--indestructable by battle --indestructable by battle
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278041,0)) e3:SetDescription(aux.Stringid(100278041,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE) e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetOperation(c100278041.indesop) e3:SetOperation(c100278041.indesop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
...@@ -7,7 +7,6 @@ function c100279001.initial_effect(c) ...@@ -7,7 +7,6 @@ function c100279001.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100279001) e1:SetCountLimit(1,100279001)
e1:SetCondition(c100279001.spcon1) e1:SetCondition(c100279001.spcon1)
...@@ -17,6 +16,7 @@ function c100279001.initial_effect(c) ...@@ -17,6 +16,7 @@ function c100279001.initial_effect(c)
--special summon from grave --special summon from grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100279001,1)) e2:SetDescription(aux.Stringid(100279001,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -29,7 +29,7 @@ function c100279001.initial_effect(c) ...@@ -29,7 +29,7 @@ function c100279001.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100279001.cfilter(c) function c100279001.cfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsLevelAbove(5) and c:IsFaceup() return c:IsType(TYPE_NORMAL) and c:IsLevelAbove(5) and c:IsFaceup()
end end
function c100279001.spcon1(e,tp,eg,ep,ev,re,r,rp) function c100279001.spcon1(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION)
...@@ -75,7 +75,7 @@ function c100279001.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function c100279001.spop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(c100279001.atkcon) e1:SetCondition(c100279001.atkcon)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOwnerPlayer(tp) e1:SetOwnerPlayer(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) e2:SetCode(EFFECT_MUST_ATTACK_MONSTER)
......
...@@ -11,20 +11,20 @@ function c100279003.initial_effect(c) ...@@ -11,20 +11,20 @@ function c100279003.initial_effect(c)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--remove --remove
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100279003,1)) e2:SetDescription(aux.Stringid(100279003,1))
e2:SetCategory(CATEGORY_REMOVE) e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c100279003.rmtg) e2:SetTarget(c100279003.rmtg)
e2:SetOperation(c100279003.rmop) e2:SetOperation(c100279003.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100279003,2)) e3:SetDescription(aux.Stringid(100279003,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100279003) e3:SetCountLimit(1,100279003)
e3:SetCost(c100279003.thcost) e3:SetCost(c100279003.thcost)
e3:SetTarget(c100279003.thtg) e3:SetTarget(c100279003.thtg)
...@@ -63,9 +63,10 @@ function c100279003.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,9 +63,10 @@ function c100279003.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c100279003.thfilter(c) function c100279003.thfilter(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(7) and c:IsRace(RACE_DRAGON)) return c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
or (c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(6) and c:IsRace(RACE_MACHINE)) and ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(7) and c:IsRace(RACE_DRAGON))
or (c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(5) and c:IsRace(RACE_WARRIOR))) and c:IsAbleToHand() or (c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(6) and c:IsRace(RACE_MACHINE))
or (c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(5) and c:IsRace(RACE_WARRIOR)))
end end
function c100279003.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100279003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100279003.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100279003.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -8,7 +8,6 @@ function c100341001.initial_effect(c) ...@@ -8,7 +8,6 @@ function c100341001.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCondition(c100341001.eqcon)
e1:SetTarget(c100341001.eqtg) e1:SetTarget(c100341001.eqtg)
e1:SetOperation(c100341001.eqop) e1:SetOperation(c100341001.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -31,15 +30,13 @@ function c100341001.initial_effect(c) ...@@ -31,15 +30,13 @@ function c100341001.initial_effect(c)
e3:SetOperation(c100341001.spop) e3:SetOperation(c100341001.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100341001.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():CheckUniqueOnField(tp)
end
function c100341001.filter(c) function c100341001.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsSetCard(0x93) return c:IsFaceup() and c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsSetCard(0x93)
end end
function c100341001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100341001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100341001.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100341001.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp)
and Duel.IsExistingTarget(c100341001.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end and Duel.IsExistingTarget(c100341001.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100341001.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) Duel.SelectTarget(tp,c100341001.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
...@@ -53,9 +50,6 @@ function c100341001.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,9 +50,6 @@ function c100341001.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
c100341001.equip_cyber_monster(c,tp,tc)
end
function c100341001.equip_cyber_monster(c,tp,tc)
if not Duel.Equip(tp,c,tc) then return end if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -24,7 +24,7 @@ function c100341022.initial_effect(c) ...@@ -24,7 +24,7 @@ function c100341022.initial_effect(c)
end end
function c100341022.spfilter(c,e,tp) function c100341022.spfilter(c,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsSetCard(0x93) and c:IsType(TYPE_FUSION) return c:IsSetCard(0x93) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_FUSION)
and (c:IsAbleToExtra() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false))) and (c:IsAbleToExtra() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false)))
end end
function c100341022.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100341022.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -47,7 +47,7 @@ function c100341022.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function c100341022.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c100341022.repfilter(c,tp) function c100341022.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x93) and c:IsType(TYPE_FUSION) return c:IsFaceup() and c:IsSetCard(0x93) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_FUSION)
and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end end
function c100341022.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c100341022.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
--Script by XyLeN --Script by XyLeN
function c100341035.initial_effect(c) function c100341035.initial_effect(c)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -35,13 +35,13 @@ function c100341035.initial_effect(c) ...@@ -35,13 +35,13 @@ function c100341035.initial_effect(c)
end end
function c100341035.eqfilter(c,tp) function c100341035.eqfilter(c,tp)
return c:IsSetCard(0x4093) and c:IsFaceup() and c:IsType(TYPE_EFFECT) return c:IsSetCard(0x4093) and c:IsFaceup() and c:IsType(TYPE_EFFECT)
and Duel.IsExistingMatchingCard(c100341035.eqfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,c,tp) and Duel.IsExistingMatchingCard(c100341035.eqfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end end
function c100341035.eqfilter2(c,tc,tp) function c100341035.eqfilter2(c)
return c:IsRace(RACE_DRAGON+RACE_MACHINE) and not c:IsForbidden() return c:IsRace(RACE_DRAGON+RACE_MACHINE) and not c:IsForbidden()
end end
function c100341035.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100341035.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c100341035.eqfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100341035.eqfilter(chkc,tp) end
if chk==0 then return Duel.GetFlagEffect(tp,100341035)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetFlagEffect(tp,100341035)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c100341035.eqfilter,tp,LOCATION_MZONE,0,1,nil,tp) end and Duel.IsExistingTarget(c100341035.eqfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
...@@ -33,7 +33,8 @@ function c100341053.fselect(g,tp) ...@@ -33,7 +33,8 @@ function c100341053.fselect(g,tp)
end end
function c100341053.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c100341053.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100341053.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c100341053.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
if chk==0 then return Duel.GetCustomActivityCount(100341053,tp,ACTIVITY_SPSUMMON)==0 and g:CheckSubGroup(c100341053.fselect,2,2,tp) end if chk==0 then return Duel.GetCustomActivityCount(100341053,tp,ACTIVITY_SPSUMMON)==0
and g:CheckSubGroup(c100341053.fselect,2,2,tp) end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -57,7 +57,7 @@ end ...@@ -57,7 +57,7 @@ end
function c100342051.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100342051.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST)
and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCustomActivityCount(100342051,tp,ACTIVITY_SPSUMMON)==0
and Duel.GetFlagEffect(tp,100342051+100)==0 and Duel.GetFlagEffect(tp,100342051+100)==0
and (Duel.GetFlagEffect(tp,100342051)==0 or c:GetFlagEffect(100342051)~=0) end and (Duel.GetFlagEffect(tp,100342051)==0 or c:GetFlagEffect(100342051)~=0) end
--splimit --splimit
...@@ -101,7 +101,7 @@ end ...@@ -101,7 +101,7 @@ end
function c100342051.spop(e,tp,eg,ep,ev,re,r,rp) function c100342051.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c100342051.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c100342051.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
......
...@@ -11,13 +11,14 @@ function c100425002.initial_effect(c) ...@@ -11,13 +11,14 @@ function c100425002.initial_effect(c)
e1:SetOperation(c100425002.tgop) e1:SetOperation(c100425002.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425002,1)) e2:SetDescription(aux.Stringid(100425002,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100425002) e2:SetCountLimit(1,100425002)
e2:SetCondition(aux.exccon) e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c100425002.sptg) e2:SetTarget(c100425002.sptg)
e2:SetOperation(c100425002.spop) e2:SetOperation(c100425002.spop)
...@@ -60,18 +61,17 @@ function c100425002.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,18 +61,17 @@ function c100425002.spop(e,tp,eg,ep,ev,re,r,rp)
local lv,code=tc:GetLevel(),tc:GetCode() local lv,code=tc:GetLevel(),tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100425002.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,code) local g=Duel.SelectMatchingCard(tp,c100425002.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,code)
local tc=g:GetFirst() local sc=g:GetFirst()
if tc then if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) sc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2) sc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end end
Duel.SpecialSummonComplete()
end end
end end
...@@ -11,8 +11,8 @@ function c100425003.initial_effect(c) ...@@ -11,8 +11,8 @@ function c100425003.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100425003) e1:SetCountLimit(1,100425003)
e1:SetCost(c100425003.cost)
e1:SetCondition(c100425003.condition) e1:SetCondition(c100425003.condition)
e1:SetCost(c100425003.cost)
e1:SetTarget(c100425003.target) e1:SetTarget(c100425003.target)
e1:SetOperation(c100425003.operation) e1:SetOperation(c100425003.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -30,8 +30,22 @@ end ...@@ -30,8 +30,22 @@ end
function c100425003.condition(e,tp,eg,ep,ev,re,r,rp) function c100425003.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c100425003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100425003,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c100425003.splimit)
Duel.RegisterEffect(e1,tp)
end
function c100425003.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WIND)
end
function c100425003.thfilter(c) function c100425003.thfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x2016) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c100425003.spfilter(c,e,tp,sync) function c100425003.spfilter(c,e,tp,sync)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
...@@ -65,7 +79,7 @@ function c100425003.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,7 +79,7 @@ function c100425003.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
else else
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetTargetCard(mg) Duel.SetTargetCard(mg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,ct,0,0)
end end
...@@ -88,20 +102,6 @@ function c100425003.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,20 +102,6 @@ function c100425003.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c100425003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100425003,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c100425003.splimit)
Duel.RegisterEffect(e1,tp)
end
function c100425003.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WIND)
end
function c100425003.mfilter(c) function c100425003.mfilter(c)
return not c:IsSetCard(0x2016) return not c:IsSetCard(0x2016)
end end
......
...@@ -39,6 +39,7 @@ end ...@@ -39,6 +39,7 @@ end
function c100425005.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c100425005.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100425005.gyfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100425005.gyfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end end
function c100425005.desop(e,tp,eg,ep,ev,re,r,rp) function c100425005.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -22,9 +22,9 @@ function c100425006.spfilter(c,e,tp,lv) ...@@ -22,9 +22,9 @@ function c100425006.spfilter(c,e,tp,lv)
end end
function c100425006.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c100425006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c100425006.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c100425006.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c100425006.target(e,tp,eg,ep,ev,re,r,rp,chk) function c100425006.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -3,21 +3,24 @@ ...@@ -3,21 +3,24 @@
function c100425007.initial_effect(c) function c100425007.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425007,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c100425007.cost) e1:SetCost(c100425007.cost)
e1:SetTarget(c100425007.target) e1:SetTarget(c100425007.target)
e1:SetOperation(c100425007.activate) e1:SetOperation(c100425007.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--substitute as a monster --substitute as a monster
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425007,0)) e2:SetDescription(aux.Stringid(100425007,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100425007+EFFECT_COUNT_CODE_DUEL) e2:SetCountLimit(1,100425007+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c100425007.spcon) e2:SetCondition(c100425007.spcon)
e2:SetTarget(c100425007.sptg) e2:SetTarget(c100425007.sptg)
...@@ -51,7 +54,7 @@ function c100425007.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +54,7 @@ function c100425007.spcon(e,tp,eg,ep,ev,re,r,rp)
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp
end end
function c100425007.lvfilter(c) function c100425007.lvfilter(c)
return c:IsSetCard(0x2016) and c:GetLevel()>0 and c:IsFaceup() return c:IsSetCard(0x2016) and c:GetLevel()>1 and c:IsFaceup()
end end
function c100425007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100425007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100425007.lvfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100425007.lvfilter(chkc) end
......
...@@ -15,9 +15,9 @@ function c100425020.initial_effect(c) ...@@ -15,9 +15,9 @@ function c100425020.initial_effect(c)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425020,1)) e2:SetDescription(aux.Stringid(100425020,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100425020+100) e2:SetCountLimit(1,100425020+100)
e2:SetCondition(c100425020.thcon) e2:SetCondition(c100425020.thcon)
...@@ -25,15 +25,16 @@ function c100425020.initial_effect(c) ...@@ -25,15 +25,16 @@ function c100425020.initial_effect(c)
e2:SetOperation(c100425020.thop) e2:SetOperation(c100425020.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100425020.tgfilter(c,tp)
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c100425020.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100425020.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c100425020.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.GetMatchingGroupCount(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)>1
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectTarget(tp,c100425020.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1) local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2) g1:Merge(g2)
...@@ -43,8 +44,8 @@ end ...@@ -43,8 +44,8 @@ end
function c100425020.desop(e,tp,eg,ep,ev,re,r,rp) function c100425020.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
...@@ -54,15 +55,15 @@ end ...@@ -54,15 +55,15 @@ end
function c100425020.thfilter(c) function c100425020.thfilter(c)
return c:IsLevel(1) and c:IsRace(RACE_PLANT) and c:IsAbleToHand() return c:IsLevel(1) and c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end end
function c100425020.tdfilter(c) function c100425020.tdfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(c100425020.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end end
function c100425020.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100425020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425020.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425020.tdfilter(chkc,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c100425020.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) if chk==0 then return Duel.IsExistingTarget(c100425020.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),tp) end
and Duel.IsExistingMatchingCard(c100425020.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100425020.tdfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,c100425020.tdfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
...@@ -70,8 +71,9 @@ function c100425020.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,8 +71,9 @@ function c100425020.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100425020.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100425020.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
......
...@@ -18,6 +18,7 @@ function c100425021.initial_effect(c) ...@@ -18,6 +18,7 @@ function c100425021.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100425021) e2:SetCountLimit(1,100425021)
e2:SetCondition(c100425021.negcon) e2:SetCondition(c100425021.negcon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
...@@ -31,14 +32,14 @@ end ...@@ -31,14 +32,14 @@ end
function c100425021.spcon(e,c) function c100425021.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c100425021.spfilter,tp,LOCATION_MZONE,0,1,nil,tp) return Duel.IsExistingMatchingCard(c100425021.spfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c100425021.negcon(e,tp,eg,ep,ev,re,r,rp) function c100425021.negcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
return at:GetControler()~=tp return at:GetControler()~=tp
end end
function c100425021.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100425021.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and aux.TRUE(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
......
...@@ -27,10 +27,10 @@ function c100425022.initial_effect(c) ...@@ -27,10 +27,10 @@ function c100425022.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100425022.lvltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100425022.lvltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end end
function c100425022.lvlop(e,tp,eg,ep,ev,re,r,rp) function c100425022.lvlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -22,28 +22,29 @@ function c100425025.initial_effect(c) ...@@ -22,28 +22,29 @@ function c100425025.initial_effect(c)
e2:SetDescription(aux.Stringid(100425025,1)) e2:SetDescription(aux.Stringid(100425025,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100425025) e2:SetCountLimit(1,100425025)
e2:SetTarget(c100425025.sptg2) e2:SetTarget(c100425025.sptg2)
e2:SetOperation(c100425025.spop2) e2:SetOperation(c100425025.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100425025.costfilter(c) function c100425025.costfilter(c,e,tp)
return c:IsSetCard(0x1017) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x1017) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c100425025.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function c100425025.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c100425025.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100425025.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100425025.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100425025.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100425025.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c100425025.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c100425025.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100425025.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c100425025.sptg1(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 true end
and Duel.IsExistingMatchingCard(c100425025.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c100425025.spop1(e,tp,eg,ep,ev,re,r,rp) function c100425025.spop1(e,tp,eg,ep,ev,re,r,rp)
...@@ -54,27 +55,28 @@ function c100425025.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,27 +55,28 @@ function c100425025.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c100425025.checkfilter(c,e,tp) function c100425025.desfilter(c,e,tp)
local code=c:GetOriginalCode() local code=c:GetOriginalCode()
return code and Duel.IsExistingMatchingCard(c100425025.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,code,e,tp) return Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c100425025.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,code,e,tp)
end end
function c100425025.spfilter2(c,code,e,tp) function c100425025.spfilter2(c,code,e,tp)
return not c:IsCode(code) and c:IsSetCard(0x1017) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsCode(code) and c:IsSetCard(0x1017) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c100425025.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100425025.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c100425025.checkfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and c100425025.desfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsExistingTarget(c100425025.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
and Duel.IsExistingTarget(c100425025.checkfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c100425025.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
local g=Duel.SelectTarget(tp,c100425025.checkfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c100425025.spop2(e,tp,eg,ep,ev,re,r,rp) function c100425025.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c100425025.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tc:GetOriginalCode(),e,tp) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100425025.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tc:GetOriginalCode(),e,tp)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -28,12 +28,10 @@ end ...@@ -28,12 +28,10 @@ end
function c100425034.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100425034.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425034.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425034.spfilter(chkc,e,tp) end
if chk==0 then if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return false end and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end and Duel.IsExistingTarget(c100425034.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
return Duel.IsExistingTarget(c100425034.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100425034.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c100425034.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g:AddCard(c) g:AddCard(c)
......
...@@ -28,7 +28,6 @@ function c100425035.thfilter(c) ...@@ -28,7 +28,6 @@ function c100425035.thfilter(c)
return c:IsSetCard(0xf7) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0xf7) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c100425035.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100425035.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c100425035.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100425035.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -60,10 +60,8 @@ function c100425037.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,10 +60,8 @@ function c100425037.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c100425037.condition(e,tp,eg,ep,ev,re,r,rp) function c100425037.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local tc=Duel.GetBattleMonster(tp)
local d=Duel.GetAttackTarget() return tc:IsFaceup() and tc~=e:GetHandler() and tc:IsRelateToBattle()
return (a:IsControler(tp) and a:IsFaceup() and a~=e:GetHandler() and a:IsRelateToBattle())
or (d and d:IsControler(tp) and d:IsFaceup() and d~=e:GetHandler() and d:IsRelateToBattle())
end end
function c100425037.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c100425037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -72,18 +70,17 @@ function c100425037.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,18 +70,17 @@ function c100425037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct) e:SetLabel(ct)
end end
function c100425037.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c100425037.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local c=e:GetHandler()
local ct=e:GetLabel() local tc=Duel.GetBattleMonster(tp)
if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end if not tc or tc==c then return end
if not a:IsRelateToBattle() then return end if tc:IsFaceup() and tc:IsRelateToBattle() and tc:IsControler(tp) then
if a==e:GetHandler() then return end local ct=e:GetLabel()
if a:IsFaceup() then local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(ct*300) e1:SetValue(ct*300)
a:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
function c100425038.initial_effect(c) function c100425038.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425038,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
......
...@@ -27,7 +27,9 @@ function c100425040.initial_effect(c) ...@@ -27,7 +27,9 @@ function c100425040.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100425040.cfilter(c,tp) function c100425040.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xf7) and (Duel.IsExistingMatchingCard(c100425040.atkfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) or Duel.IsExistingMatchingCard(c100425040.lvfilter,tp,0,LOCATION_MZONE,1,nil)) return c:IsFaceup() and c:IsSetCard(0xf7)
and (Duel.IsExistingMatchingCard(c100425040.atkfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
or Duel.IsExistingMatchingCard(c100425040.lvfilter,tp,0,LOCATION_MZONE,1,nil))
end end
function c100425040.atkfilter(c,atk) function c100425040.atkfilter(c,atk)
return c:IsFaceup() and not c:IsAttack(atk) return c:IsFaceup() and not c:IsAttack(atk)
...@@ -75,26 +77,22 @@ function c100425040.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,26 +77,22 @@ function c100425040.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c100425040.atkcon(e,tp,eg,ep,ev,re,r,rp) function c100425040.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a,d=Duel.GetBattleMonster(1-tp)
local b=Duel.GetAttackTarget() if not (a and d) then return false end
if not b then return false end return d:IsFaceup() and d:IsSetCard(0xf7)
e:SetLabelObject(b)
return b:IsFaceup() and b:IsControler(tp) and b:IsSetCard(0xf7) and a:IsControler(1-tp)
end end
function c100425040.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c100425040.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker() local a,d=Duel.GetBattleMonster(1-tp)
local b=e:GetLabelObject() if chk==0 then return d:GetAttack()~=a:GetAttack() end
if chk==0 then return b and b:GetAttack()~=a:GetAttack() end
end end
function c100425040.atkop(e,tp,eg,ep,ev,re,r,rp) function c100425040.atkop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a,d=Duel.GetBattleMonster(1-tp)
local b=e:GetLabelObject() if d:IsRelateToBattle() and a:IsRelateToBattle() and d:IsFaceup() and a:IsFaceup() then
if b and b:IsRelateToBattle() and a:IsRelateToBattle() and b:IsFaceup() and b:IsControler(tp) and a:IsFaceup() and a:IsControler(1-tp) and b:GetAttack()~=a:GetAttack() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(a:GetAttack()) e1:SetValue(a:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
b:RegisterEffect(e1) d:RegisterEffect(e1)
end end
end end
...@@ -53,7 +53,7 @@ function c101106201.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function c101106201.spop(e,tp,eg,ep,ev,re,r,rp)
if sg:GetCount()>ft then if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil) sg=sg:Select(tp,ft,ft,nil)
end end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c101106201.thfilter(c) function c101106201.thfilter(c)
......
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