Commit 25454340 authored by nanahira's avatar nanahira

finishscript

parent 9f7f3283
No preview for this file type
......@@ -11,6 +11,10 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(m-2000)==0 end
e:GetHandler():RegisterFlagEffect(m-2000,0x1fe1000+RESET_PHASE+PHASE_END,0,1)
end)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
......
......@@ -6,7 +6,7 @@ cm.Senya_name_with_prism=true
function cm.initial_effect(c)
Senya.PrismCommonEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
......@@ -30,10 +30,20 @@ function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.tgfilter(c)
return Senya.CheckPrism(c) and c:IsAbleToRemove()
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not re:GetHandler():IsStatus(STATUS_DISABLED) end
if chk==0 then return not re:GetHandler():IsStatus(STATUS_DISABLED) and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
if not Duel.NegateEffect(ev) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -2,6 +2,7 @@
local m=37564457
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.Senya_name_with_prism=true
function cm.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SEASERPENT),2,3)
c:EnableReviveLimit()
......@@ -17,7 +18,7 @@ function cm.initial_effect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLED)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_AVAILABLE_BD)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_AVAILABLE_BD+EFFECT_FLAG_CARD_TARGET)
e4:SetCost(Senya.SelfToHandCost)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
......@@ -34,7 +35,7 @@ function cm.atkfilter(c)
end
function cm.atkval(e,c)
local lg=c:GetLinkedGroup():Filter(cm.atkfilter,nil)
return lg:GetSum(Card.GetBaseAttack)
return math.ceil(lg:GetSum(Card.GetBaseAttack)/2)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
......
--百慕 急速走红·爱尔普莉娜
local m=37564458
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.Senya_name_with_prism=true
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcMix(c,true,true,Senya.check_fusion_set_prism,Senya.check_fusion_set_prism,function(c) return Senya.check_fusion_set_prism(c) and c:IsFusionType(TYPE_XYZ) end)
Senya.AddSelfFusionProcedure(c,LOCATION_MZONE,Duel.SendtoDeck,true)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local check=Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and not e:GetHandler():IsType(TYPE_TOKEN)
if not check then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
return
end
local op=Duel.SelectOption(tp,m*16,m*16+1)
if op==1 then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 then
Senya.OverlayCard(g:GetFirst(),e:GetHandler())
end
end)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp)
return Senya.CheckPrism(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and c:IsType(TYPE_XYZ)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsFaceup() then
local g=Duel.GetMatchingGroup(function(c) return c:IsFaceup() and c:IsAttackAbove(1) end,tp,LOCATION_MZONE,LOCATION_MZONE,0,c)
local atk=g:GetSum(Card.GetAttack)
if #g>0 and atk>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(atk)
c:RegisterEffect(e1)
end
end
end
\ No newline at end of file
......@@ -2,8 +2,9 @@
local m=37564459
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.Senya_name_with_prism=true
function cm.initial_effect(c)
Senya.AddXyzProcedureCustom(c,nil,cm.xyzcheck,1,3,nil,cm.ovop)
Senya.AddXyzProcedureCustom(c,nil,cm.xyzcheck,1,2,nil,cm.ovop)
Senya.PrismDamageCheckRegister(c,false)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
......@@ -12,7 +13,7 @@ function cm.initial_effect(c)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(cm.adcon)
e3:SetTarget(cm.adtg)
e5:SetValue(0)
e3:SetValue(0)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
......@@ -47,7 +48,7 @@ function cm.xyzcheck(g,xyzc)
return Senya.PrismXyzCheck(2,2)(g)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and Senya.CheckPrism(c) and c:CheckRemoveOverlayCard(tp,1,REASON_COST)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and Senya.CheckPrism(c) and c:GetRank()==3 and c:CheckRemoveOverlayCard(tp,1,REASON_COST)
end
function cm.ovop(e,tp,g,c)
if #g==1 then
......
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