Commit 412f2176 authored by salix5's avatar salix5

announce card

parent aaa5de32
......@@ -23,17 +23,17 @@ function c50078320.initial_effect(c)
c:RegisterEffect(e2)
end
function c50078320.condition(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return false end
local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_ANNOUNCE)
return ex and cv==ANNOUNCE_CARD
return rp~=tp and ex and bit.band(cv,ANNOUNCE_CARD)~=0
end
function c50078320.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c50078320.operation(e,tp,eg,ep,ev,re,r,rp)
local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_ANNOUNCE)
Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp)
local ac=Duel.AnnounceCard(tp,cv)
Duel.ChangeTargetParam(ev,ac)
end
function c50078320.desfilter(c)
......
......@@ -10,6 +10,7 @@ function c78053598.initial_effect(c)
end
function c78053598.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_DECK,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,TYPE_MONSTER)
end
function c78053598.filter(c,code)
return c:IsType(TYPE_MONSTER) and c:IsCode(code) and c:IsAbleToHand()
......
......@@ -586,7 +586,7 @@ CATEGORY_DICE =0x2000000 --骰子效果
CATEGORY_LEAVE_GRAVE =0x4000000 --离开墓地效果
CATEGORY_LVCHANGE =0x8000000 --改变等级效果
CATEGORY_NEGATE =0x10000000 --使发动无效效果
CATEGORY_ANNOUNCE =0x20000000 --宣言效果
CATEGORY_ANNOUNCE =0x20000000 --發動時宣言卡名的效果
--Hint
HINT_EVENT =1
HINT_MESSAGE =2
......@@ -703,7 +703,7 @@ ACTIVITY_ATTACK =5 --
ACTIVITY_BATTLE_PHASE =6 -- not available in custom counter
ACTIVITY_CHAIN =7 -- only available in custom counter
--announce type(宣言类型,CATEGORY_ANNOUNCE的OperationInfo的target_param)
ANNOUNCE_CARD =1 --宣言卡片
ANNOUNCE_CARD =0x7 --宣言卡片
--special cards
CARD_MARINE_DOLPHIN =78734254 --海洋海豚
CARD_TWINKLE_MOSS =13857930 --光輝苔蘚
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