- 
                Notifications
    
You must be signed in to change notification settings  - Fork 840
 
Implement rooms (Bottomless Pool // Locker Room) #13786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from 44 commits
      Commits
    
    
            Show all changes
          
          
            65 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      b1c96aa
              
                get rooms entering the battlefield
              
              
                oscscull 82f6025
              
                gets etb working properly
              
              
                oscscull c69cb9c
              
                mostly working, needs text and mana costs to be perfected
              
              
                oscscull 1a29e7e
              
                adds mana values
              
              
                oscscull d634c3c
              
                adds rules text hiding
              
              
                oscscull b3e4fab
              
                working except on rules text
              
              
                oscscull d27f3bb
              
                adds more needed stuff
              
              
                oscscull 0309c12
              
                finish main room features
              
              
                oscscull 63f5e29
              
                clean up, revert accidental formatting
              
              
                oscscull 6a9ff16
              
                renames
              
              
                oscscull f0ec5cc
              
                Add first test, add matching code for rooms  to test code
              
              
                oscscull 6240446
              
                expand testing, fix issues
              
              
                oscscull 8c0eb8d
              
                unneeded import
              
              
                oscscull cc87208
              
                fix name predicate edge case
              
              
                oscscull 159825a
              
                add unlock test
              
              
                oscscull 4db99d5
              
                simplify
              
              
                oscscull 08f8452
              
                revert this. I don't know that the logic here was wrong - i need to c…
              
              
                oscscull fc130c9
              
                add flicker tests
              
              
                oscscull 947b55a
              
                checkpoint up to failing test (copy not working)
              
              
                oscscull 57f304f
              
                Get copy on stack working
              
              
                oscscull 524ec0f
              
                Add clone test
              
              
                oscscull f6943ca
              
                Test name match (stack)
              
              
                oscscull 3b32f07
              
                reanimate after counter
              
              
                oscscull 53463bd
              
                on battlefield tests
              
              
                oscscull 49dbf27
              
                add the pithing needle example
              
              
                oscscull 7f49d1a
              
                Add test of changing one permanent into two rooms
              
              
                oscscull 13c6f3b
              
                Don't think this is correct behaviour pinned in test. (Maybe I'm miss…
              
              
                oscscull 8a239cb
              
                revert this (formatted accidentally)
              
              
                oscscull c1db8f1
              
                fix
              
              
                oscscull 52b846f
              
                Merge remote-tracking branch 'upstream/master' into implement-rooms
              
              
                oscscull 2aa0784
              
                add subtype to halves
              
              
                oscscull 75a347f
              
                Merge remote-tracking branch 'upstream/master' into implement-rooms
              
              
                oscscull 3d054f6
              
                fix subtype
              
              
                oscscull d2f4f5d
              
                merge
              
              
                oscscull 6b3664f
              
                remvoe unused event
              
              
                oscscull cf64a1e
              
                Merge branch 'master' into implement-rooms
              
              
                oscscull cf0a50e
              
                merge
              
              
                oscscull b22b476
              
                updates split card constructor (reorder)
              
              
                oscscull ddd6c66
              
                update to call super where we can
              
              
                oscscull da68abb
              
                renaming
              
              
                oscscull 0c469e0
              
                update right / left condition thing
              
              
                oscscull 68d165e
              
                unify unlock method
              
              
                oscscull e7e3113
              
                rejig comments
              
              
                oscscull 2a18c54
              
                update test
              
              
                oscscull 3fd9849
              
                make method names align
              
              
                oscscull 809cc25
              
                add comment
              
              
                oscscull e1d6a9f
              
                getSourcePermanentIfItStillExists
              
              
                oscscull f5333a9
              
                updated test with sakashima
              
              
                oscscull da54574
              
                inline var
              
              
                oscscull b83b239
              
                simplify
              
              
                oscscull 5f1882b
              
                undo bad formatting
              
              
                oscscull fa5380f
              
                past tense
              
              
                oscscull 3a0ea99
              
                past tense
              
              
                oscscull 8bd6f14
              
                update events
              
              
                oscscull 2762928
              
                update to enum
              
              
                oscscull 824e374
              
                verbiage + simplifications
              
              
                oscscull 48eb886
              
                capitalization
              
              
                oscscull 9017b2c
              
                comprehensive comments
              
              
                oscscull 1edbb1e
              
                revert formatting
              
              
                oscscull f1fdf63
              
                indentation
              
              
                oscscull 6b44c38
              
                comment events
              
              
                oscscull ce1ad28
              
                check door half in the right place
              
              
                oscscull 4b09679
              
                renaming
              
              
                oscscull 5ea427d
              
                unified characteristics class
              
              
                oscscull ac65ae7
              
                more formatting
              
              
                oscscull File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| package mage.cards.b; | ||
| 
     | 
||
| import java.util.UUID; | ||
| 
     | 
||
| import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility; | ||
| import mage.abilities.common.UnlockThisDoorTriggeredAbility; | ||
| import mage.abilities.effects.common.DrawCardSourceControllerEffect; | ||
| import mage.abilities.effects.common.ReturnToHandTargetEffect; | ||
| import mage.cards.CardSetInfo; | ||
| import mage.cards.RoomCard; | ||
| import mage.constants.CardType; | ||
| import mage.constants.SetTargetPointer; | ||
| import mage.constants.SpellAbilityType; | ||
| import mage.constants.SubType; | ||
| import mage.constants.TargetController; | ||
| import mage.filter.StaticFilters; | ||
| import mage.target.common.TargetCreaturePermanent; | ||
| 
     | 
||
| /** | ||
| * @author oscscull | ||
| */ | ||
| public final class BottomlessPoolLockerRoom extends RoomCard { | ||
| 
     | 
||
| public BottomlessPoolLockerRoom(UUID ownerId, CardSetInfo setInfo) { | ||
| super(ownerId, setInfo, | ||
| new CardType[] { CardType.ENCHANTMENT }, | ||
| "{U}", "{4}{U}", SpellAbilityType.SPLIT); | ||
| this.subtype.add(SubType.ROOM); | ||
| 
     | 
||
| // Left half ability - "When you unlock this door" trigger (delayed triggered | ||
| // ability) | ||
| UnlockThisDoorTriggeredAbility left = new UnlockThisDoorTriggeredAbility( | ||
| new ReturnToHandTargetEffect(), false, true); | ||
| left.addTarget(new TargetCreaturePermanent(0, 1)); | ||
| 
     | 
||
| // Right half ability - "Whenever creatures you control deal combat damage" | ||
| DealsDamageToAPlayerAllTriggeredAbility right = new DealsDamageToAPlayerAllTriggeredAbility( | ||
| new DrawCardSourceControllerEffect(1), | ||
| StaticFilters.FILTER_CONTROLLED_A_CREATURE, | ||
| false, SetTargetPointer.PLAYER, true, true, TargetController.OPPONENT); | ||
| 
     | 
||
| this.AddRoomAbilities(left, right); | ||
| } | ||
| 
     | 
||
| private BottomlessPoolLockerRoom(final BottomlessPoolLockerRoom card) { | ||
| super(card); | ||
| } | ||
| 
     | 
||
| @Override | ||
| public BottomlessPoolLockerRoom copy() { | ||
| return new BottomlessPoolLockerRoom(this); | ||
| } | ||
| } | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| package mage.cards.s; | ||
| 
     | 
||
| import java.util.UUID; | ||
| 
     | 
||
| import mage.abilities.common.AttacksWithCreaturesTriggeredAbility; | ||
| import mage.abilities.common.UnlockThisDoorTriggeredAbility; | ||
| import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; | ||
| import mage.abilities.effects.common.counter.AddCountersTargetEffect; | ||
| import mage.cards.CardSetInfo; | ||
| import mage.cards.RoomCard; | ||
| import mage.constants.CardType; | ||
| import mage.constants.ComparisonType; | ||
| import mage.constants.SpellAbilityType; | ||
| import mage.constants.SubType; | ||
| import mage.counters.CounterType; | ||
| import mage.filter.FilterCard; | ||
| import mage.filter.common.FilterCreatureCard; | ||
| import mage.filter.predicate.mageobject.ManaValuePredicate; | ||
| import mage.target.common.TargetAttackingCreature; | ||
| import mage.target.common.TargetCardInYourGraveyard; | ||
| 
     | 
||
| /** | ||
| * | ||
| * @author oscscull | ||
| */ | ||
| public final class SurgicalSuiteHospitalRoom extends RoomCard { | ||
| private static final FilterCard filter = new FilterCreatureCard( | ||
| "creature card with mana value 3 or less from your graveyard"); | ||
| 
     | 
||
| static { | ||
| filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4)); | ||
| } | ||
| 
     | 
||
| public SurgicalSuiteHospitalRoom(UUID ownerId, CardSetInfo setInfo) { | ||
| // Surgical Suite | ||
| // {1}{W} | ||
| // When you unlock this door, return target creature card with mana value 3 or | ||
| // less from your graveyard to the battlefield. | ||
| // Hospital Room | ||
| // {3}{W} | ||
| // Enchantment -- Room | ||
| // Whenever you attack, put a +1/+1 counter on target attacking creature. | ||
| super(ownerId, setInfo, | ||
| new CardType[] { CardType.ENCHANTMENT }, | ||
| "{1}{W}", "{3}{W}", SpellAbilityType.SPLIT); | ||
| this.subtype.add(SubType.ROOM); | ||
| 
     | 
||
| // Left half ability | ||
| UnlockThisDoorTriggeredAbility left = new UnlockThisDoorTriggeredAbility( | ||
| new ReturnFromGraveyardToBattlefieldTargetEffect(), false, true); | ||
| left.addTarget(new TargetCardInYourGraveyard(filter)); | ||
| 
     | 
||
| // Right half ability | ||
| AttacksWithCreaturesTriggeredAbility right = new AttacksWithCreaturesTriggeredAbility( | ||
| new AddCountersTargetEffect(CounterType.P1P1.createInstance()), 1 | ||
| ); | ||
| right.addTarget(new TargetAttackingCreature()); | ||
| 
     | 
||
| this.AddRoomAbilities(left, right); | ||
| } | ||
| 
     | 
||
| private SurgicalSuiteHospitalRoom(final SurgicalSuiteHospitalRoom card) { | ||
| super(card); | ||
| } | ||
| 
     | 
||
| @Override | ||
| public SurgicalSuiteHospitalRoom copy() { | ||
| return new SurgicalSuiteHospitalRoom(this); | ||
| } | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.