Commit 04d5aed7 authored by POLYMER's avatar POLYMER

fix

parent 45c66c16
No preview for this file type
......@@ -222,6 +222,7 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED then rc:ResetFlagEffect(m) end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
rc:CancelToGrave(false)
......
......@@ -155,7 +155,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
--if not e:GetHandler():IsRelateToEffect(e) then return end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil then return false end
......
......@@ -155,7 +155,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
--if not e:GetHandler():IsRelateToEffect(e) then return end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil then return false end
......
......@@ -156,7 +156,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
--if not e:GetHandler():IsRelateToEffect(e) then return end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil then return false end
......
......@@ -155,7 +155,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
--if not e:GetHandler():IsRelateToEffect(e) then return end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil then return false end
......
......@@ -154,7 +154,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
--if not e:GetHandler():IsRelateToEffect(e) then return end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil then return false end
......
......@@ -154,7 +154,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
--if not e:GetHandler():IsRelateToEffect(e) then return end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil then return false end
......
......@@ -228,7 +228,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
--if not e:GetHandler():IsRelateToEffect(e) then return end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil or lpz==nil then return false end
......
......@@ -26,7 +26,7 @@ end
function c22022060.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c22022060.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c22022060.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
--海造贼-强敌
function c44227728.initial_effect(c)
aux.AddRitualProcGreater2(c,c44227728.ritual_filter)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(44227728,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,44227728)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c44227728.eqtg)
e1:SetOperation(c44227728.eqop)
c:RegisterEffect(e1)
end
function c44227728.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsRace(RACE_FIEND)
end
function c44227728.eqfilter(c,ec,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x13f) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function c44227728.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x13f) and Duel.IsExistingMatchingCard(c44227728.eqfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,c,tp)
end
function c44227728.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c44227728.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c44227728.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c44227728.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c44227728.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c44227728.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc,tp)
local sc=g:GetFirst()
if not sc then return end
if not Duel.Equip(tp,sc,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(c44227728.eqlimit)
sc:RegisterEffect(e1)
end
end
function c44227728.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
......@@ -87,6 +87,9 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
local con=v:GetCondition()
if not con then con=aux.TRUE end
e1:SetCondition(s.recon(con))
e1:SetReset(RESET_EVENT+0xfe0000)
rc:RegisterEffect(e1,true)
end
......@@ -101,6 +104,11 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e2,true)
rc:RegisterFlagEffect(id,RESET_EVENT+0xfe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
end
function s.recon(_con)
return function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and _con(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.rdisop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsPreviousControler,nil,1-tp)
local c=e:GetHandler()
......
--海造贼—幽灵船长
function c97647362.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(97647362,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,97647362)
e1:SetTarget(c97647362.sptg)
e1:SetOperation(c97647362.spop)
c:RegisterEffect(e1)
--ritual level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_RITUAL_LEVEL)
e2:SetValue(c97647362.rlevel)
c:RegisterEffect(e2)
--SearchCard
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(97647362,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,97647363)
e3:SetTarget(c97647362.thtg2)
e3:SetOperation(c97647362.thop2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_LEAVE_FIELD)
c:RegisterEffect(e4)
end
function c97647362.eqfilter(c,tp)
return c:IsSetCard(0x13f) and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp)
end
function c97647362.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c97647362.eqfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c97647362.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectTarget(tp,c97647362.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,sg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c97647362.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Equip(tp,tc,c,false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c97647362.eqlimit)
tc:RegisterEffect(e1)
end
end
end
function c97647362.eqlimit(e,c)
return e:GetOwner()==c
end
function c97647362.rlevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsSetCard(0x13f) then
local clv=c:GetLevel()
return (lv<<16)+clv
else return lv end
end
function c97647362.thfilter2(c)
return c:IsSetCard(0x13f) and c:IsType(TYPE_MONSTER) and not c:IsCode(97647362) and c:IsAbleToHand()
end
function c97647362.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97647362.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c97647362.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c97647362.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
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(c97647362.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c97647362.splimit(e,c)
return not c:IsSetCard(0x13f)
end
\ No newline at end of file
--海造贼-刚岩之要塞号
function c98832779.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x13f),2,true)
--cannot be indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c98832779.tgtg)
e1:SetValue(aux.indoval)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98832779,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,98832779)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c98832779.discon)
e2:SetCost(c98832779.discost)
e2:SetTarget(c98832779.distg)
e2:SetOperation(c98832779.disop)
c:RegisterEffect(e2)
end
function c98832779.tgtg(e,c)
return c:IsSetCard(0x13f) and c~=e:GetHandler()
end
function c98832779.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c98832779.discfilter(c)
return c:IsDiscardable() and c:IsSetCard(0x13f)
end
function c98832779.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98832779.discfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c98832779.discfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c98832779.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c98832779.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x13f)
end
function c98832779.thfilter(c)
return c:IsSetCard(0x13f) and c:IsAbleToHand()
end
function c98832779.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)
and Duel.Destroy(eg,REASON_EFFECT)>0 and c:IsRelateToEffect(e)
and c:GetEquipGroup():IsExists(c98832779.eqfilter,1,nil)
and Duel.IsExistingMatchingCard(c98832779.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(98832779,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98832779.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--海晶少女的集结
function c98920161.initial_effect(c)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98920161,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_ACTIVATE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCondition(c98920161.spcon)
e5:SetTarget(c98920161.sptg)
e5:SetOperation(c98920161.spop)
c:RegisterEffect(e5)
end
function c98920161.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c98920161.spfilter(c,e,tp)
return c:IsSetCard(0x12b) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920161.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98920161.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c98920161.gselect(g)
return aux.dncheck(g) and g:GetClassCount(Card.GetLocation)==#g
end
function c98920161.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98920161.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c98920161.gselect,false,1,math.min(ft,3))
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.SetLP(tp,Duel.GetLP(tp)-1500)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c98920161.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98920161.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
\ No newline at end of file
......@@ -35,7 +35,7 @@ function c98920637.initial_effect(c)
c:RegisterEffect(e3)
end
function c98920637.matfilter(c)
return c:IsLinkSetCard(0xc1) and not c:IsLinkCode(98920637)
return c:IsLinkRace(RACE_PSYCHO) and not c:IsLinkCode(98920637)
end
function c98920637.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc1) and c:GetBaseAttack()>=0
......
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