-
Notifications
You must be signed in to change notification settings - Fork 438
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: Лимиты на заклинание кровавый обряд. #6566
base: master220
Are you sure you want to change the base?
Conversation
4 сообщения, уж потрудись их на русский перевести. |
Сойдет? |
Нет, переведи на балуны. |
Co-authored-by: PlayerUnknown14 <139672964+PlayerUnknown14@users.noreply.github.com>
@BeebBeebBoob pr уже неделю висит |
if(length(spells)) | ||
if(entered_spell_name == "Blood Rites") | ||
if(locate(/datum/action/innate/cult/blood_spell/manipulation) in spells) | ||
owner.balloon_alert(owner, "лимит данного заклинания достигнут!") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это бы сделать на стороне экшена - засунуть в грант + убрать этот чек на энтеред спелл нейм и проверку длины спеллов. В текущем виде это костыль
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
зачем убирать чек на энтеред спелл нейм и перемещать в грант?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
эти чеки равносильны стаку истайпов/иных бесполезных проверок, когда можно передать это дело на сторону объектов. Если тебе нужно, что бы опред. спелл имел свои условия выдачи - меняй его грант
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Он прав. Лучше засунь такую проверку в грант, но тогда будет тупо если чел кастует, ему пишет что он приготовил спелл, но также пишит "спелл пропал, вы достигли максимума"
Можно так сделать
Создай новый прок на проверку для типа /datum/action/innate/cult/blood_spell
/datum/action/innate/cult/blood_spell/proc/can_blood_cast()
return TRUE
/datum/action/innate/cult/blood_spell/manipulation/can_blood_cast()
if(locate(/datum/action/innate/cult/blood_spell/manipulation) in holder.spells или как-то так)
return FALSE
return ..()
и перед
if(!channeling)
засунь проверку
if(QDELETED(src) || owner.incapacitated() || !BS || (rune && !(locate(/obj/effect/rune/empower) in range(1, owner))) || (length(spells) >= limit))
return
var/datum/action/innate/cult/blood_spell/new_spell = new BS(owner)
if(!new_spell.can_blood_cast())
qdel(new_spell)
return
//И также перед каждым return удаление спелла. Мы его возвели потому что нам надо был прок проверки.
//Ничего страшного не будет от создания, пока мы не Грант юзеру.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
если засунуть проверку
if(can_blood_cast == FALSE) owner.balloon_alert(owner, "лимит данного заклинания достигнут!") return
то оно работать не будет
Описание
Добавляет лимиты описанные в предложении.
Причина создания ПР / Почему это хорошо для игры
https://discord.com/channels/617003227182792704/755125334097133628/1336544671605854373
Демонстрация изменений
Больше нельзя иметь более 300 использований. Также можно иметь только одно заклинание кровавого обряда
Тесты
Все проверил