Commit 483bfe27 authored by mercury233's avatar mercury233

update new cards

parent f7e43204
#created by ...
#main
100278014
100278024
100278007
100278009
100278010
......
--氷騎士
--scripted by XyLeN
function c100278014.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c100278014.val)
c:RegisterEffect(e1)
--extra normal summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278014,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c100278014.sumcon)
e2:SetTarget(c100278014.sumtg)
e2:SetOperation(c100278014.sumop)
c:RegisterEffect(e2)
end
function c100278014.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_AQUA)
end
function c100278014.val(e,c)
return Duel.GetMatchingGroupCount(c100278014.cfilter,c:GetControler(),LOCATION_MZONE,0,nil)*400
end
function c100278014.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,100278014)==0
end
function c100278014.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end
end
function c100278014.sumop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(100278014,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(c100278014.extrasumtg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,100278014,RESET_PHASE+PHASE_END,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c100278014.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e3,tp)
end
function c100278014.extrasumtg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function c100278014.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
--アイス・ミラー
--scripted by XyLeN
function c100278024.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c100278024.target)
e1:SetOperation(c100278024.activate)
c:RegisterEffect(e1)
end
function c100278024.filter(c,e,tp)
return c:IsFaceup() and c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER)
and Duel.IsExistingMatchingCard(c100278024.filter2,tp,LOCATION_DECK,0,1,nil,c:GetCode(),e,tp)
end
function c100278024.filter2(c,code,e,tp)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278024.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100278024.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100278024.filter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c100278024.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100278024.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c100278024.filter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode(),e,tp)
local sc=sg:GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c100278024.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1,true)
end
end
function c100278024.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
......@@ -29,7 +29,7 @@ function c100278029.initial_effect(c)
Duel.AddCustomActivityCounter(100278029,ACTIVITY_SPSUMMON,c100278029.counterfilter)
end
function c100278029.counterfilter(c)
return not c:IsAttribute(ATTRIBUTE_WATER)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function c100278029.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
......
......@@ -37,6 +37,13 @@ function c100278030.initial_effect(c)
e3:SetTarget(c100278030.sptg)
e3:SetOperation(c100278030.spop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetOperation(c100278030.regop)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
c100278030.xyz_number=4
function c100278030.descon(e,tp,eg,ep,ev,re,r,rp)
......@@ -61,11 +68,14 @@ function c100278030.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
function c100278030.spcon(e,tp,eg,ep,ev,re,r,rp)
function c100278030.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetOverlayCount()
e:SetLabel(ct)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) and ct>0
e:GetLabelObject():SetLabel(ct)
end
function c100278030.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()>0
end
function c100278030.spfilter(c,e,tp)
return c:IsCode(100278031) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -17,11 +17,11 @@ function c101104089.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x15f)
end
function c101104089.actcon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end
if not Duel.IsExistingMatchingCard(c101104089.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
return (re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsControler(1-tp))
or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and ep==1-tp)
return ep==1-tp and Duel.IsChainDisablable(ev)
and Duel.IsExistingMatchingCard(c101104089.cfilter,tp,LOCATION_MZONE,0,1,nil)
and ((re:IsActiveType(TYPE_MONSTER) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE)
or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))))
end
function c101104089.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment