def _apply_mana(game_state: GameState):
    if not game_state.player_state.mana_resource.is_at_max():
        create_potion_visual_effect_at_player(game_state)
        player_receive_mana(MANA_AMOUNT, game_state)
        return ConsumableWasConsumed()
    else:
        return ConsumableFailedToBeConsumed("Already at full mana!")
Beispiel #2
0
def _apply_health(game_state: GameState):
    if not game_state.player_state.health_resource.is_at_max():
        create_potion_visual_effect_at_player(game_state)
        player_receive_healing(HEALING_AMOUNT, game_state)
        return ConsumableWasConsumed()
    else:
        return ConsumableFailedToBeConsumed("Already at full health!")
def _apply_speed(game_state: GameState):
    create_potion_visual_effect_at_player(game_state)
    game_state.player_state.gain_buff_effect(
        get_buff_effect(BuffType.INCREASED_MOVE_SPEED), DURATION)
    return ConsumableWasConsumed()
Beispiel #4
0
def _apply(game_state: GameState):
    create_potion_visual_effect_at_player(game_state)
    game_state.player_state.gain_buff_effect(get_buff_effect(BUFF_TYPE), DURATION)
    return ConsumableWasConsumed()
Beispiel #5
0
def _apply_invis(game_state: GameState):
    create_potion_visual_effect_at_player(game_state)
    game_state.player_state.gain_buff_effect(
        get_buff_effect(BuffType.INVISIBILITY), Millis(5000))
    return ConsumableWasConsumed()