@@ -44,16 +44,13 @@ function s.atkval(e,c)
4444end
4545-- Negate the activation of an opponent's monster effect
4646function s .negcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
47- local g = Duel . GetMatchingGroup ( Card . IsMonster , tp , LOCATION_GRAVE , 0 , nil )
48- local c , rc , att = e : GetHandler (), re : GetHandler (), 0
47+ local c = e : GetHandler ( )
48+ if not c : IsRitualSummoned () then return false end
4949 local mat = c :GetMaterial ()
50- if re :IsMonsterEffect () and rp == 1 - tp and not c :IsStatus (STATUS_BATTLE_DESTROYED ) and Duel .IsChainNegatable (ev )
51- and c :IsRitualSummoned () and mat :GetClassCount (Card .GetAttribute )> 1 then
52- for tc in g :Iter () do
53- att = att |tc :GetAttribute ()
54- end
55- return rc :GetAttribute ()&att > 0
56- end
50+ if not (mat :GetBinClassCount (Card .GetAttribute )>= 2 and Duel .IsChainNegatable (ev ) and rp == 1 - tp and not c :IsStatus (STATUS_BATTLE_DESTROYED )) then return false end
51+ local trig_typ ,trig_att = Duel .GetChainInfo (ev ,CHAININFO_TRIGGERING_TYPE ,CHAININFO_TRIGGERING_ATTRIBUTE )
52+ local g = Duel .GetMatchingGroup (Card .IsMonster ,tp ,LOCATION_GRAVE ,0 ,nil )
53+ return # g > 0 and trig_typ &TYPE_MONSTER > 0 and g :IsExists (Card .IsAttribute ,1 ,nil ,trig_att )
5754end
5855function s .negtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
5956 if chk == 0 then return true end
@@ -84,7 +81,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
8481 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
8582 local g = Duel .SelectMatchingCard (tp ,s .thfilter ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil )
8683 if # g > 0 then
87- Duel .SendtoHand (tc ,nil ,REASON_EFFECT )
88- Duel .ConfirmCards (1 - tp ,tc )
84+ Duel .SendtoHand (g ,nil ,REASON_EFFECT )
85+ Duel .ConfirmCards (1 - tp ,g )
8986 end
9087end
0 commit comments