public virtual void Open(Hero hero) { switch (HeapType) { case Type.Tomb: Wraith.SpawnAround(hero.pos); break; case Type.Skeleton: CellEmitter.Center(Pos).Start(Speck.Factory(Speck.RATTLE), 0.1f, 3); if (Items.Any(item => item.cursed)) { if (Wraith.SpawnAt(Pos) == null) { hero.Sprite.Emitter().Burst(ShadowParticle.Curse, 6); hero.Damage(hero.HP / 2, this); } Sample.Instance.Play(Assets.SND_CURSED); } break; } HeapType = Type.Heap; Sprite.Link(); Sprite.Drop(); }