Union dragon monster effect fully working
This commit is contained in:
@@ -26,15 +26,16 @@ end
|
||||
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
|
||||
if chkc then return chkc:IsControler(1-tp) and s.thfilter(chkc) end
|
||||
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,0,LOCATION_MZONE,1,nil) end
|
||||
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
|
||||
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
|
||||
local g=Duel.SelectTarget(tp,s.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
|
||||
local d=g:GetFirst():GetAttack()
|
||||
Duel.SetTargetPlayer(tp)
|
||||
Duel.SetTargetPlayer(1-tp) --tp changed to 1-tp cuz of line 27
|
||||
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,d)
|
||||
end
|
||||
function s.thop(e,tp,eg,ep,ev,re,r,rp)
|
||||
local tc=Duel.GetFirstTarget()
|
||||
local tc=Duel.GetFirstTarget() --target card?
|
||||
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
|
||||
if tc and tc:IsRelateToEffect(e) and Duel.Damage(p,tc:GetAttack(),REASON_EFFECT) then
|
||||
Duel.Destroy(tc, REASON_DESTROY)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user