Example #1
0
 public bool CollideWith(Tile t)
 {
     if(t.Is(TileType.FIREPIT) && !t.Is(FeatureType.SLIME)){
         B.Add(You("fall") + " into the fire pit. ",this);
         ApplyBurning();
     }
     if(IsBurning()){
         t.ApplyEffect(DamageType.FIRE);
     }
     if(t.Is(FeatureType.SLIME) && !HasAttr(AttrType.SLIMED)){
         B.Add(YouAre() + " covered in slime. ",this);
         attrs[AttrType.SLIMED] = 1;
         attrs[AttrType.OIL_COVERED] = 0;
         RefreshDuration(AttrType.BURNING,0);
         if(this == player){
             Help.TutorialTip(TutorialTopic.Slimed);
         }
     }
     else{
         if(t.Is(FeatureType.OIL) && !HasAttr(AttrType.SLIMED,AttrType.OIL_COVERED)){
             B.Add(YouAre() + " covered in oil. ",this);
             attrs[AttrType.OIL_COVERED] = 1;
             if(this == player){
                 Help.TutorialTip(TutorialTopic.Oiled);
             }
         }
         else{
             if(t.IsBurning()){
                 ApplyBurning();
             }
         }
     }
     if(!HasAttr(AttrType.SMALL)){
         t.ApplyEffect(DamageType.NORMAL);
     }
     return !HasAttr(AttrType.CORPSE);
 }