Commit d700b883 authored by nanahira's avatar nanahira

new

parent 4b076c20
No preview for this file type
...@@ -42,7 +42,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
c:SetEntityCode(tcode,true) c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0) c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode]) Duel.SetMetatable(c,_G["c"..tcode])
Duel.Hint(11,0,m*16) Duel.Hint(HINT_MUSIC,0,m*16)
Duel.Hint(HINT_CARD,0,m+1) Duel.Hint(HINT_CARD,0,m+1)
Duel.ConfirmCards(tp,Group.FromCards(c)) Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c)) Duel.ConfirmCards(1-tp,Group.FromCards(c))
......
...@@ -52,7 +52,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
c:ReleaseEffectRelation(e) c:ReleaseEffectRelation(e)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
Duel.Hint(11,0,m*16+2) Duel.Hint(HINT_MUSIC,0,m*16+2)
end end
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -73,7 +73,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
c:ReplaceEffect(tcode,0,0) c:ReplaceEffect(tcode,0,0)
c:SetEntityCode(tcode,true) c:SetEntityCode(tcode,true)
Duel.SetMetatable(c,_G["c"..tcode]) Duel.SetMetatable(c,_G["c"..tcode])
Duel.Hint(11,0,m*16+3) Duel.Hint(HINT_MUSIC,0,m*16+3)
Duel.Hint(HINT_CARD,0,m+1) Duel.Hint(HINT_CARD,0,m+1)
Duel.ConfirmCards(tp,Group.FromCards(c)) Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c)) Duel.ConfirmCards(1-tp,Group.FromCards(c))
......
...@@ -2402,7 +2402,7 @@ function cm.AddSummonMusic(c,desc,stype) ...@@ -2402,7 +2402,7 @@ function cm.AddSummonMusic(c,desc,stype)
e1:SetCondition(cm.SummonTypeCondition(stype)) e1:SetCondition(cm.SummonTypeCondition(stype))
end end
e1:SetOperation(function() e1:SetOperation(function()
Duel.Hint(11,0,desc) Duel.Hint(HINT_MUSIC,0,desc)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -2501,7 +2501,7 @@ function cm.AddSummonSE(c,desc) ...@@ -2501,7 +2501,7 @@ function cm.AddSummonSE(c,desc)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(function() e1:SetOperation(function()
Duel.Hint(12,0,desc) Duel.Hint(HINT_SOUND,0,desc)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -2522,7 +2522,7 @@ function cm.AddAttackSE(c,desc) ...@@ -2522,7 +2522,7 @@ function cm.AddAttackSE(c,desc)
return cm.AttackSEList[Duel.GetAttacker()] return cm.AttackSEList[Duel.GetAttacker()]
end) end)
e1:SetOperation(function() e1:SetOperation(function()
Duel.Hint(12,0,cm.AttackSEList[Duel.GetAttacker()]) Duel.Hint(HINT_SOUND,0,cm.AttackSEList[Duel.GetAttacker()])
end) end)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
end end
......
--3L·Crimson Glory
local m=37564852
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.effect_operation_3L(c)
local ex1=Effect.CreateEffect(c)
ex1:SetType(EFFECT_TYPE_FIELD)
ex1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ex1:SetRange(LOCATION_MZONE)
ex1:SetCode(EFFECT_CANNOT_LOSE_KOISHI)
ex1:SetTargetRange(1,0)
ex1:SetValue(1)
ex1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(ex1,true)
return ex1
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp
end
function cm.MergeCard(g,p,loc,seq)
local tc=Duel.GetFieldCard(p,loc,seq)
if tc then
g:AddCard(tc)
return true
else
return false
end
end
function cm.GetCrossGroup(p,seq)
local g=Group.CreateGroup()
for i=0,4 do
if i~=seq then cm.MergeCard(g,p,LOCATION_MZONE,seq) end
end
cm.MergeCard(g,p,LOCATION_SZONE,seq)
cm.MergeCard(g,1-p,LOCATION_MZONE,4-seq)
cm.MergeCard(g,1-p,LOCATION_SZONE,4-seq)
if seq==1 then
cm.MergeCard(g,p,LOCATION_MZONE,5)
cm.MergeCard(g,1-p,LOCATION_MZONE,6)
elseif seq==3 then
cm.MergeCard(g,p,LOCATION_MZONE,6)
cm.MergeCard(g,1-p,LOCATION_MZONE,5)
end
return g
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local res={}
local zones={}
for p=0,1 do
for seq=0,4 do
zones[p]=0
local g=cm.GetCrossGroup(p,seq)
if g:GetCount()>0 then zones[p]=zones[p] | (0x1 << seq) end
end
res[p]=zones[p]>0 and Duel.GetMZoneCount(p,nil,tp,LOCATION_REASON_TOFIELD,zones[p])>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,p,zones[p])
end
return res[0] or res[1]
end
local g=Group.CreateGroup()
for p=0,1 do
for seq=0,4 do
local tg=cm.GetCrossGroup(p,seq)
if Duel.CheckLocation(p,LOCATION_MZONE,seq) then g:Merge(tg) do
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local res={}
local zones={}
for p=0,1 do
for seq=0,4 do
zones[p]=0
local g=cm.GetCrossGroup(p,seq)
if g:GetCount()>0 then zones[p]=zones[p] | (0x1 << seq) end
end
res[p]=zones[p]>0 and Duel.GetMZoneCount(p,nil,tp,LOCATION_REASON_TOFIELD,zones[p])>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,p,zones[p])
end
local sp=nil
if res[0] and res[1] then
sp=Duel.SelectOption(tp,m*16+2,m*16+3)==0 and tp or 1-tp
elseif res[tp] then
sp=tp
elseif res[1-tp] then
sp=1-tp
else
return
end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK,zones[sp])>0 then
Duel.Hint(HINT_MUSIC,0,m*16+4)
local dg=cm.GetCrossGroup(c:GetControler(),c:GetSequence())
Duel.BreakEffect()
local ct=Duel.Destroy(dg,REASON_EFFECT)
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end
end
\ No newline at end of file
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