/
Bybaleshqa
/
Fsfall
Обзор
Документация
Войти
/
Bybaleshqa
/
Fsfall
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
Releases
example_engine/ExplosiveTimer/hs_explosivetimer.ssl
40 строк
1 KB
Mr.Stalin
Обновление файлов репозитория.
28 дек 2024, 22:25
28 дек 2024, 22:25
a0b6454
Код
Авторство
О чём код?
/* * * Example implementation of the algorithm of how the game engine sets the explosive timer. * */ #include "..\..\scripting\headers\define_lite.h" #include "..\..\scripting\headers\sfall.h" procedure start; procedure start begin if (init_hook == false) then begin variable time := get_sfall_arg, result := ROLL_CRITICAL_FAILURE; if (has_trait(TRAIT_PERK, dude_obj, PERK_demolition_expert_perk)) then result := ROLL_SUCCESS; else begin result := roll_vs_skill(dude_obj, SKILL_TRAPS, 0); end if (result) then begin if (result == ROLL_FAILURE) then time /= 2; else begin // success or critical success result := ROLL_SUCCESS; end end else begin // critical failure time := 0; result := ROLL_FAILURE; end set_sfall_arg(0, time); set_sfall_return(time); set_sfall_return(result); /* допустимо только ROLL_FAILURE и ROLL_SUCCESS */ end end