static void soulTouch(Entity *other) { if (self->health == 1 && other->type == PLAYER) { if (self->target != NULL) { self->target->inUse = FALSE; } keyItemTouch(other); } else if (self->health == 1 && strcmpignorecase(other->name, "enemy/spirit") == 0) { self->touch = NULL; self->action = &bottleFill; self->activate = NULL; fireTrigger(other->objectiveName); other->target = self; other->action = other->die; self->mental = 11; playSoundToMap("sound/enemy/spirit/spirit_explode", -1, self->x, self->y, 0); self->endX = playSoundToMap("sound/enemy/spirit/spirit_scream", -1, self->x, self->y, 0); } }
static void bindTouch(Entity *other) { if (strcmpignorecase(other->objectiveName, self->requires) == 0) { if (other->health <= 0) { other->endY = -100; } else { other->endY = -99; other->health = other->maxHealth; } self->inUse = FALSE; } else if (other->type == PLAYER && self->thinkTime <= 0) { keyItemTouch(other); } }