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

add: midround space wizards! #6023

Open
wants to merge 5 commits into
base: master220
Choose a base branch
from

Conversation

NightDawnFox
Copy link
Contributor

@NightDawnFox NightDawnFox commented Oct 14, 2024

Описание

В случае, если на станции больше 10 живых игроков, то в качестве мажорного ивента начинают роллиться космические маги. Подсчет - один маг за каждые 30 человек. При триггере ивента блокируется возможность использовать часть заклинаний, привязанных к режиму "рагин магес".

Ссылка на предложение/Причина создания ПР

https://discord.com/channels/617003227182792704/755125334097133628/1225661296423473152
Пересозданная предложка
https://discord.com/channels/617003227182792704/755125334097133628/1297625539615522867

Тесты

запустил локалку
вызвал ивент, проверил как подсчитывается количество игроков
закомментил ту часть, где ивент не запускается, если меньше 10 игроков и перезапустил локалку
заспавнился за мага и проверил книгу заклинаний

@Vladisvell
Copy link
Collaborator

code/modules/events/wizards.dm:36:error: GLOB.wizard_events_triggered: undefined var
code/game/gamemodes/wizard/spellbook.dm:756:error: GLOB.wizard_events_triggered: undefined var

@NightDawnFox
Copy link
Contributor Author

code/modules/events/wizards.dm:36:error: GLOB.wizard_events_triggered: undefined var code/game/gamemodes/wizard/spellbook.dm:756:error: GLOB.wizard_events_triggered: undefined var

я заметил, да.

code/modules/events/wizards.dm Outdated Show resolved Hide resolved
code/modules/events/wizards.dm Outdated Show resolved Hide resolved
code/modules/events/wizards.dm Outdated Show resolved Hide resolved
code/modules/events/wizards.dm Outdated Show resolved Hide resolved
code/modules/events/wizards.dm Outdated Show resolved Hide resolved
code/modules/events/wizards.dm Outdated Show resolved Hide resolved
@Daeberdir
Copy link
Member

Ещё будет круто, если мы не будем мержить что-либо по протухшей предложке.

Comment on lines +29 to +33
if(!candidates.len)
log_and_message_admins("Warning: Could not spawn any mobs for event Wizard Raid. Reason - not enough candidates.")
var/datum/event_container/EC = SSevents.event_containers[EVENT_LEVEL_MAJOR]
EC.next_event_time = world.time + (60 SECONDS)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

раз уж нет кандидатов, то в конце твоих манипуляций с кулдауном нужно поставить return

Comment on lines +34 to +41
while(mages_number && length(candidates))
var/mob/new_mage = pick_n_take(candidates)
if(new_mage)
GLOB.wizard_events_triggered += 1
var/mob/living/carbon/human/new_character= makeBody(new_mage)
new_character.mind.make_Wizard() // This puts them at the wizard spawn, worry not
mages_number--
log_game("Spawned [new_character] (ckey: [new_character.key]) as midround Wizard.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

учитывая прошлый комментарий - это легче и лучше будет переписать на for

var/mob/new_mage = pick_n_take(candidates)
if(new_mage)
GLOB.wizard_events_triggered += 1
var/mob/living/carbon/human/new_character= makeBody(new_mage)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var/mob/living/carbon/human/new_character= makeBody(new_mage)
var/mob/living/carbon/human/new_character = makeBody(new_mage)

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

Successfully merging this pull request may close these issues.

4 participants