Skip to content
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

Variable for total creatures left in pool without considering attraction requirements #3777

Open
lokrok opened this issue Dec 26, 2024 · 5 comments

Comments

@lokrok
Copy link

lokrok commented Dec 26, 2024

There doesn't seem to be any way to determine the amount of creatures left in the creature pool for a player. This would be useful for map-making, especially in my case where I would like a player to lose if they have no creatures in their dungeon or in their pool (with DEAD_CREATURES_RETURN_TO_POOL(0)). It would also be nice if this had separate variables for Evil and Good creatures: TOTAL_CREATURES_IN_POOL, EVIL_CREATURES_IN_POOL, GOOD_CREATURES_IN_POOL.

@Loobinex
Copy link
Member

IF_AVAILABLE(PLAYER0,TOTAL_CREATURES

@lokrok
Copy link
Author

lokrok commented Dec 26, 2024

IF_AVAILABLE(PLAYER0,TOTAL_CREATURES

I've tried this but it doesn't seem to work. Regardless of the amount of creatures in the pool, it seems to always return 0 which results in this section of the script killing the player.

IF_AVAILABLE(PLAYER0,TOTAL_CREATURES == 0)
	IF(PLAYER0,TOTAL_CREATURES == 0)
		SET_HEART_HEALTH(PLAYER0,0)
	ENDIF
ENDIF

@Loobinex
Copy link
Member

Try it within a timer, IF_AVAILABLE also considers attraction requirements.

@lokrok
Copy link
Author

lokrok commented Dec 27, 2024

Try it within a timer, IF_AVAILABLE also considers attraction requirements.

Makes sense, but this also means that if the player doesn't have a room for a creature in the pool, it won't count towards the available variable. This isn't something I want to test for.

@lokrok lokrok changed the title Variable for total creatures left in pool Variable for total creatures left in pool without considering attraction requirements Dec 27, 2024
@walt253

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants