From 910124aaf16178f09f13a0bb979cb7897ee07711 Mon Sep 17 00:00:00 2001 From: Playmaker1210 Date: Mon, 13 Dec 2021 19:04:25 +0100 Subject: [PATCH] Union dragon monster effect fully working --- lua/c561586060.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/c561586060.lua b/lua/c561586060.lua index 325546b..52d3847 100644 --- a/lua/c561586060.lua +++ b/lua/c561586060.lua @@ -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 \ No newline at end of file