Commit bcae02dc authored by DailyShana's avatar DailyShana

CATEGROY_ANNOUNCE

parent 1219bc46
...@@ -32,14 +32,16 @@ function c10406322.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,14 +32,16 @@ function c10406322.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,0) Duel.Hint(HINT_SELECTMSG,tp,0)
local ac=Duel.AnnounceCard(tp) local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac) Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end end
function c10406322.operation(e,tp,eg,ep,ev,re,r,rp) function c10406322.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
......
...@@ -18,11 +18,11 @@ function c10809984.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,11 +18,11 @@ function c10809984.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,564) Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp) local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac) Duel.SetTargetParam(ac)
e:GetHandler():SetHint(CHINT_CARD,ac) Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end end
function c10809984.drop(e,tp,eg,ep,ev,re,r,rp) function c10809984.drop(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabel() local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac) local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,hg) Duel.ConfirmCards(tp,hg)
......
...@@ -15,11 +15,11 @@ function c15800838.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -15,11 +15,11 @@ function c15800838.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,564) Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp) local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac) Duel.SetTargetParam(ac)
e:GetHandler():SetHint(CHINT_CARD,ac) Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end end
function c15800838.operation(e,tp,eg,ep,ev,re,r,rp) function c15800838.operation(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabel() local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac) local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,hg) Duel.ConfirmCards(tp,hg)
......
...@@ -25,14 +25,16 @@ function c22796548.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,14 +25,16 @@ function c22796548.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,0) Duel.Hint(HINT_SELECTMSG,tp,0)
local ac=Duel.AnnounceCard(tp) local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac) Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end end
function c22796548.operation(e,tp,eg,ep,ev,re,r,rp) function c22796548.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not Duel.IsPlayerCanDiscardDeck(tp,1) then return end if not e:GetHandler():IsRelateToEffect(e) or not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
......
...@@ -14,10 +14,12 @@ function c29417188.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -14,10 +14,12 @@ function c29417188.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,564) Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp) local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac) Duel.SetTargetParam(ac)
e:GetHandler():SetHint(CHINT_CARD,ac) Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end end
function c29417188.operation(e,tp,eg,ep,ev,re,r,rp) function c29417188.operation(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
e:GetHandler():SetHint(CHINT_CARD,ac)
--forbidden --forbidden
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -25,7 +27,7 @@ function c29417188.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +27,7 @@ function c29417188.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_FORBIDDEN) e1:SetCode(EFFECT_FORBIDDEN)
e1:SetTargetRange(0x7f,0x7f) e1:SetTargetRange(0x7f,0x7f)
e1:SetTarget(c29417188.bantg) e1:SetTarget(c29417188.bantg)
e1:SetLabel(e:GetLabel()) e1:SetLabel(ac)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
...@@ -33,7 +35,7 @@ function c29417188.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +35,7 @@ function c29417188.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_DISABLE) e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0x7f,0x7f) e2:SetTargetRange(0x7f,0x7f)
e2:SetTarget(c29417188.bantg) e2:SetTarget(c29417188.bantg)
e2:SetLabel(e:GetLabel()) e2:SetLabel(ac)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
......
...@@ -14,11 +14,11 @@ function c33423043.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -14,11 +14,11 @@ function c33423043.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler()) end and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,564) Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp) local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac) Duel.SetTargetParam(ac)
e:GetHandler():SetHint(CHINT_CARD,ac) Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end end
function c33423043.operation(e,tp,eg,ep,ev,re,r,rp) function c33423043.operation(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabel() local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac) local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,hg) Duel.ConfirmCards(tp,hg)
......
...@@ -5,6 +5,7 @@ function c43711255.initial_effect(c) ...@@ -5,6 +5,7 @@ function c43711255.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c43711255.target) e1:SetTarget(c43711255.target)
e1:SetOperation(c43711255.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--forbidden --forbidden
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -32,6 +33,11 @@ function c43711255.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,6 +33,11 @@ function c43711255.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,564) Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp) local ac=Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c43711255.activate(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
e:SetLabel(ac) e:SetLabel(ac)
e:GetHandler():SetHint(CHINT_CARD,ac) e:GetHandler():SetHint(CHINT_CARD,ac)
end end
...@@ -15,14 +15,16 @@ function c72403299.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -15,14 +15,16 @@ function c72403299.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,0) Duel.Hint(HINT_SELECTMSG,tp,0)
local ac=Duel.AnnounceCard(tp) local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac) Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end end
function c72403299.operation(e,tp,eg,ep,ev,re,r,rp) function c72403299.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
......
...@@ -581,6 +581,7 @@ CATEGORY_DICE =0x2000000 --骰子效果 ...@@ -581,6 +581,7 @@ CATEGORY_DICE =0x2000000 --骰子效果
CATEGORY_LEAVE_GRAVE =0x4000000 --离开墓地效果 CATEGORY_LEAVE_GRAVE =0x4000000 --离开墓地效果
CATEGORY_LVCHANGE =0x8000000 --改变等级效果 CATEGORY_LVCHANGE =0x8000000 --改变等级效果
CATEGORY_NEGATE =0x10000000 --使发动无效效果 CATEGORY_NEGATE =0x10000000 --使发动无效效果
CATEGORY_ANNOUNCE =0x20000000 --宣言效果
--Hint --Hint
HINT_EVENT =1 HINT_EVENT =1
HINT_MESSAGE =2 HINT_MESSAGE =2
...@@ -696,3 +697,5 @@ ACTIVITY_FLIPSUMMON =4 -- ...@@ -696,3 +697,5 @@ ACTIVITY_FLIPSUMMON =4 --
ACTIVITY_ATTACK =5 -- ACTIVITY_ATTACK =5 --
ACTIVITY_BATTLE_PHASE =6 -- not available in custom counter ACTIVITY_BATTLE_PHASE =6 -- not available in custom counter
ACTIVITY_CHAIN =7 -- only available in custom counter ACTIVITY_CHAIN =7 -- only available in custom counter
--announce type(宣言类型,CATEGORY_ANNOUNCE的OperationInfo的target_param)
ANNOUNCE_CARD =1 --宣言卡片
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