Commit da9045c4 authored by mercury233's avatar mercury233

fix

parent cadea056
--海神の依代
--
--Script by Trishula9
--Script by Trishula9 & mercury233
function c100200209.initial_effect(c)
aux.AddCodeList(c,22702055)
--choose effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200209,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -25,61 +26,51 @@ function c100200209.initial_effect(c)
e2:SetOperation(c100200209.thop)
c:RegisterEffect(e2)
end
function c100200209.cpfilter(c,ec)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelAbove(1) and (not c:IsLevel(ec:GetLevel()) or c:IsCode(ec:GetCode()))
end
function c100200209.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
function c100200209.tgfilter(c,e,tp,ec,spchk)
return c:IsAttribute(ATTRIBUTE_WATER)
and (c:IsLevelAbove(1) and ec:IsLevelAbove(1) and (not c:IsLevel(ec:GetLevel()) or not c:IsCode(ec:GetCode()))
or spchk and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE))
end
function c100200209.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c:IsAttribute(ATTRIBUTE_WATER) end
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c100200209.cpfilter,tp,LOCATION_GRAVE,0,1,nil,c)
local b2=Duel.IsEnvironment(22702055) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100200209.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local s=0
local g=nil
if b1 and not b2 then
s=Duel.SelectOption(tp,aux.Stringid(100200209,1))
end
if not b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(100200209,2))+1
end
if b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(100200209,1),aux.Stringid(100200209,2))
end
e:SetLabel(s)
if s==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
g=Duel.SelectTarget(tp,c100200209.cpfilter,tp,LOCATION_GRAVE,0,1,1,nil,c)
e:SetCategory(0)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=Duel.SelectTarget(tp,c100200209.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
local spchk=Duel.IsEnvironment(22702055) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100200209.tgfilter(chkc,e,tp,c,spchk) end
if chk==0 then return Duel.IsExistingTarget(c100200209.tgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c,spchk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100200209.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c,spchk)
end
function c100200209.operation(e,tp,eg,ep,ev,re,r,rp)
local s=e:GetLabel()
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if s==0 and tc and tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetCode())
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetValue(tc:GetLevel())
c:RegisterEffect(e2)
end
if s==1 and tc and tc:IsRelateToEffect(e) and Duel.IsEnvironment(22702055) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local b1=tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() and c:IsLevelAbove(1)
and tc:IsLevelAbove(1) and (not c:IsLevel(tc:GetLevel()) or not c:IsCode(tc:GetCode()))
local b2=tc:IsRelateToEffect(e) and Duel.IsEnvironment(22702055) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and aux.NecroValleyFilter()(tc) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
if b1 or b2 then
local s
if b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(100200209,1),aux.Stringid(100200209,2))
elseif b1 then
s=Duel.SelectOption(tp,aux.Stringid(100200209,1))
else
s=Duel.SelectOption(tp,aux.Stringid(100200209,2))+1
end
if s==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetCode())
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetValue(tc:GetLevel())
c:RegisterEffect(e2)
end
if s==1 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -63,7 +63,7 @@ function c100283001.ovop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Overlay(c,Group.FromCards(tc))
end
......
--アビス・シャーク
--
--Script by Trishula9
--Script by Trishula9 & mercury233
function c100426001.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
......@@ -70,7 +70,7 @@ function c100426001.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(0,1)
e2:SetCondition(c100426001.damcon)
e2:SetValue(DOUBLE_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL+PHASE_END)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c100426001.splimit(e,c,sump,sumtype,sumpos,targetp,se)
......@@ -79,7 +79,12 @@ end
function c100426001.damcon(e)
local tp=e:GetHandlerPlayer()
local a,d=Duel.GetBattleMonster(tp)
return a and d and a:GetControler()==tp and a:IsSetCard(0x48)
if a and d and a:GetControler()==tp and a:IsSetCard(0x48) and a:IsStatus(STATUS_OPPO_BATTLE)
and Duel.GetFlagEffect(tp,100426001)==0 then
Duel.RegisterFlagEffect(tp,100426001,RESET_PHASE+PHASE_END,0,1)
return true
end
return false
end
function c100426001.xyzlv(e,c,rc)
if rc:IsSetCard(0x48) then
......@@ -87,4 +92,4 @@ function c100426001.xyzlv(e,c,rc)
else
return c:GetLevel()
end
end
\ No newline at end of file
end
......@@ -43,7 +43,7 @@ function c100426003.ovfilter(c,sc)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
return no and no>=101 and no<=107 and c:IsCanBeXyzMaterial(sc)
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c:IsCanBeXyzMaterial(sc)
end
function c100426003.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100426003.ovfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
......@@ -54,13 +54,14 @@ end
function c100426003.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100426003,0))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mg=Duel.SelectMatchingCard(tp,c100426003.ovfilter,tp,LOCATION_EXTRA,0,1,1,nil,c)
if #mg==0 then return end
Duel.Overlay(c,mg)
local g=Duel.GetMatchingGroup(c100426003.ovfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,c)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100426003,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100426003,0))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg)
local tc=tg:GetFirst()
......
......@@ -35,7 +35,7 @@ function c100426004.spfilter(c,e,tp,mc)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and mc:IsCanBeXyzMaterial(c)
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c100426004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -23,7 +23,7 @@ function c100426007.filter(c)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
return no and no>=101 and no<=107
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ)
end
function c100426007.cfilter(c)
if not c:IsType(TYPE_XYZ) then return false end
......@@ -53,6 +53,11 @@ function c100426007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
s=Duel.SelectOption(tp,aux.Stringid(100426007,0),aux.Stringid(100426007,1))
end
e:SetLabel(s)
if s==0 then
e:SetCategory(0)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
end
end
function c100426007.operation(e,tp,eg,ep,ev,re,r,rp)
local s=e:GetLabel()
......
......@@ -16,7 +16,7 @@ function c100426016.initial_effect(c)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100426016,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
......@@ -32,7 +32,7 @@ function c100426016.initial_effect(c)
e3:SetDescription(aux.Stringid(100426016,2))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES+CATEGORY_GRAVE_SPSUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,100426016+200)
e3:SetCondition(c100426016.spcon)
......
......@@ -20,7 +20,8 @@ function c100426018.initial_effect(c)
--NegateAttack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100426018,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1,100426018+100)
......@@ -73,7 +74,8 @@ function c100426018.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c100426018.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) then
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) then
Duel.NegateAttack()
end
end
......@@ -20,7 +20,6 @@ function c100426019.initial_effect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,100426019+100)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100426019.discon)
......@@ -54,7 +53,7 @@ function c100426019.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100426019.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(22702055) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
return Duel.IsEnvironment(22702055)
and ep==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function c100426019.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -63,7 +62,8 @@ function c100426019.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c100426019.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateEffect(ev) and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(100426019,2)) then
if Duel.NegateEffect(ev) and c:IsRelateToEffect(e) and c:IsFaceup()
and Duel.SelectYesNo(tp,aux.Stringid(100426019,2)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -50,14 +50,14 @@ end
function c100426021.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100426021.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(100426021,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
--destroy
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......
......@@ -9,6 +9,7 @@ function c100426022.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100426022+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c100426022.cost)
e1:SetTarget(c100426022.target)
e1:SetOperation(c100426022.activate)
......@@ -38,24 +39,42 @@ end
function c100426022.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=math.min(2,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local tg=Duel.GetMatchingGroup(c100426022.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=tg:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if g1 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g2=Duel.GetMatchingGroup(c100426022.spfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
if ft1>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ft1>0 and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil)
and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(100426022,0)) then
Duel.BreakEffect()
if ft>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local tg=Duel.GetMatchingGroup(c100426022.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=g2:Select(tp,1,ft1,nil)
if g3 then
Duel.SpecialSummon(g3,0,tp,tp,false,false,POS_FACEUP)
local g1=tg:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if g1 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g2=Duel.GetMatchingGroup(c100426022.spfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
if ft1>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ft1>0 and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil)
and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(100426022,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=g2:Select(tp,1,ft1,nil)
if g3 then
Duel.SpecialSummon(g3,0,tp,tp,false,false,POS_FACEUP)
end
end
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100426022.splimit)
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,tp)
end
end
function c100426022.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
......@@ -36,7 +36,7 @@ function c100426032.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100426032.filter,tp,LOCATION_ONFIELD,0,1,1,c,c)
Duel.SelectTarget(tp,c100426032.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100426032.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -59,7 +59,7 @@ function c100426032.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x12b) and c:IsType(TYPE_LINK)
end
function c100426032.eqfilter(c)
return c:IsSetCard(0x12b) and c:IsType(TYPE_LINK)
return c:IsSetCard(0x12b) and c:IsType(TYPE_LINK) and not c:IsForbidden()
end
function c100426032.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100426032.tgfilter(chkc) end
......
......@@ -68,7 +68,7 @@ end
function c100426034.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return Duel.GetTurnPlayer()==1-tp and bit.band(loc,LOCATION_SZONE)~=0
and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev)
end
function c100426034.spfilter(c,e,tp,ec)
return c:IsSetCard(0x12b) and c:GetEquipTarget()==ec and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -20,7 +20,7 @@ function c100426036.initial_effect(c)
c:RegisterEffect(e2)
end
function c100426036.texfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_WATER)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToExtra()
and Duel.IsExistingMatchingCard(c100426036.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c100426036.spfilter(c,e,tp,rc)
......@@ -33,6 +33,7 @@ function c100426036.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.SelectTarget(tp,c100426036.texfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100426036.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -18,6 +18,7 @@ function c100426037.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.bpcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100426037.attg)
e2:SetOperation(c100426037.atop)
......@@ -34,7 +35,7 @@ function c100426037.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c100426037.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100426037.spfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil,e,tp)
if Duel.NegateAttack() and #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.NegateAttack() and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -54,7 +54,7 @@ function c101106085.atkup(e,c)
return Duel.GetMatchingGroupCount(c101106085.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler())*200
end
function c101106085.filter(c)
return c:IsSetCard(0x170) and c:IsType(TYPE_MONSTER) and not c:IsCode(101106085)
return c:IsSetCard(0x170) and c:IsType(TYPE_MONSTER) and not c:IsCode(101106085) and c:IsAbleToHand()
end
function c101106085.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101106085.filter,tp,LOCATION_DECK,0,1,nil) end
......@@ -65,5 +65,6 @@ function c101106085.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c101106085.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......@@ -88,9 +88,7 @@ function c101106090.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101106090.cfilter,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101106090.cfilter,tp,LOCATION_GRAVE,0,2,2,e:GetHandler())
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101106090.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -7,6 +7,7 @@ function c101106091.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101106091+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101106091.cost)
e1:SetTarget(c101106091.target)
......
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