Commit c5276bc3 authored by mercury233's avatar mercury233

fix

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