Commit 1c175380 authored by mercury233's avatar mercury233

new cards 19PR

parent ccdae0e2
--獣湧き肉躍り
function c33298291.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,33298291+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33298291.condition)
e1:SetTarget(c33298291.target)
e1:SetOperation(c33298291.activate)
c:RegisterEffect(e1)
end
function c33298291.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local atk=g:GetSum(Card.GetAttack)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil and atk>=8000
end
function c33298291.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
function c33298291.spfilter1(c,e,tp,chk)
return c33298291.spfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c33298291.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalCode(),chk)
end
function c33298291.spfilter2(c,e,tp,code1,chk)
return c33298291.spfilter(c,e,tp)
and c:GetOriginalCode()~=code1
and Duel.IsExistingMatchingCard(c33298291.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp,code1,c:GetOriginalCode(),chk)
end
function c33298291.spfilter3(c,e,tp,code1,code2,chk)
return c33298291.spfilter(c,e,tp)
and c:GetOriginalCode()~=code1 and c:GetOriginalCode()~=code2
and (not chk or not (c:IsHasEffect(EFFECT_NECRO_VALLEY) and Duel.IsChainDisablable(0)))
end
function c33298291.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingMatchingCard(c33298291.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c33298291.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingMatchingCard(c33298291.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,true) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=Duel.SelectMatchingCard(tp,c33298291.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=Duel.SelectMatchingCard(tp,c33298291.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,sg1:GetFirst():GetOriginalCode(),true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg3=Duel.SelectMatchingCard(tp,c33298291.spfilter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,sg1:GetFirst():GetOriginalCode(),sg2:GetFirst():GetOriginalCode(),true)
sg1:Merge(sg2)
sg1:Merge(sg3)
Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
--飛鯉
function c33314479.initial_effect(c)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,33314479)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c33314479.cost)
e1:SetOperation(c33314479.operation)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(aux.bdocon)
e2:SetCountLimit(1,33314480)
e2:SetCost(c33314479.spcost)
e2:SetTarget(c33314479.sptg)
e2:SetOperation(c33314479.spop)
c:RegisterEffect(e2)
end
function c33314479.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable()
end
function c33314479.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33314479.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c33314479.cfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c33314479.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c33314479.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c33314479.spfilter(c,e,tp)
return c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33314479.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c33314479.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c33314479.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33314479.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--一惜二跳
function c6203182.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,6203182+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c6203182.target)
e1:SetOperation(c6203182.operation)
c:RegisterEffect(e1)
--atklimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_ATTACK)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetValue(aux.ctg)
c:RegisterEffect(e3)
--control
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_CONTROL)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c6203182.ctcon)
e4:SetOperation(c6203182.ctop)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetOperation(c6203182.desop)
c:RegisterEffect(e5)
end
function c6203182.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c6203182.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c6203182.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c6203182.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c6203182.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c6203182.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP) then
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c6203182.eqlimit)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
function c6203182.eqlimit(e,c)
return e:GetOwner()==c
end
function c6203182.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
local rc=ec:GetReasonCard()
return ec and rc and c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_MATERIAL)
and (ec:IsReason(REASON_FUSION) or ec:IsReason(REASON_SYNCHRO) or ec:IsReason(REASON_XYZ) or ec:IsReason(REASON_LINK))
end
function c6203182.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
local rc=ec:GetReasonCard()
if rc then
Duel.GetControl(rc,tp)
end
end
function c6203182.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--虫忍 ハガクレミノ
function c70709488.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c70709488.lcheck)
c:EnableReviveLimit()
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c70709488.tgcon)
e1:SetValue(aux.imval1)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,70709488)
e2:SetCondition(c70709488.spcon)
e2:SetTarget(c70709488.sptg)
e2:SetOperation(c70709488.spop)
c:RegisterEffect(e2)
end
function c70709488.lcheck(g,lc)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function c70709488.tgfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c70709488.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLinkedGroup():IsExists(c70709488.tgfilter,1,nil)
end
function c70709488.cfilter(c,tp,zone)
local seq=c:GetPreviousSequence()
if c:GetPreviousControler()~=tp then seq=seq+16 end
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_MZONE) and bit.extract(zone,seq)~=0
end
function c70709488.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c70709488.cfilter,1,nil,tp,e:GetHandler():GetLinkedZone())
end
function c70709488.spfilter(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c70709488.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c70709488.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c70709488.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c70709488.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
--リンクアップル
function c7925734.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7925734,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7925734)
e1:SetCost(c7925734.spcost)
e1:SetTarget(c7925734.sptg)
e1:SetOperation(c7925734.spop)
c:RegisterEffect(e1)
end
function c7925734.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c7925734.rmfilter(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function c7925734.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7925734.rmfilter,tp,LOCATION_EXTRA,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
end
function c7925734.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c7925734.rmfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()==0 then return end
local tc=g:RandomSelect(tp,1):GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED)
and c:IsRelateToEffect(e) then
if tc:IsType(TYPE_LINK) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
else
if Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
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