Crossfire Server, Trunk
altar_valkyrie Namespace Reference

Functions

def accept (description)
 

Variables

 altar = Crossfire.WhoAmI()
 
int level_factor = 0
 
 obj = altar.Above
 
int part_factor = 1
 
 pl = Crossfire.WhoIsActivator()
 
 praying = pl.CheckArchInventory('skill_praying')
 
int res = 0
 
int value = obj.Exp / 5 * part_factor
 

Detailed Description

Altar of Valkyrie
Followers of Valkyrie don't get any praying spells, because Valkyrie hates magic.
Instead, they gain experience by combat bravery; and the way they prove that is
by bringing the flesh of dead enemies as a sacrifice in Her altar.

Of course, the script only activates for followers of Valkyrie, and only runs for
sacrifices of type FLESH.

Then, it can handle each in two ways:

- Ideally, all items will have Exp stored.  In this case, you'll get 1/5 of that
  Exp, with a bonus if it's a head or heart.

- Otherwise, we'll use the Level and resistances to estimate how hard it was to
  kill the monster.  In fact, I'm not at all certain the algorithm used to
  estimate is reasonable at all for higher levels...  but then again, I'm not
  sure it's still necessary either, so feel free to remove it :-)

Function Documentation

◆ accept()

Variable Documentation

◆ altar

altar_valkyrie.altar = Crossfire.WhoAmI()

◆ level_factor

float altar_valkyrie.level_factor = 0

Definition at line 39 of file altar_valkyrie.py.

◆ obj

◆ part_factor

float altar_valkyrie.part_factor = 1

Definition at line 40 of file altar_valkyrie.py.

◆ pl

altar_valkyrie.pl = Crossfire.WhoIsActivator()

Definition at line 28 of file altar_valkyrie.py.

Referenced by account_char_add(), account_play_cmd(), add_map_event(), add_player_event(), adjust_sign_msg(), append_spell(), apply_builder_floor(), apply_builder_item(), apply_builder_remove(), apply_builder_wall(), apply_builder_window(), apply_by_living(), apply_by_living_below(), apply_changes_to_player(), apply_cmd(), apply_map_builder(), apply_savebed(), attack_hth(), attempt_jump(), attempt_pick_lock(), basic_emote(), blinded_sight(), can_pay(), cf_object_apply_below(), cf_object_pay_amount(), cf_object_pay_item(), cf_player_can_pay(), cf_player_move(), cf_quest_get_player_state(), cf_quest_set_player_state(), cf_quest_start(), cf_quest_was_completed(), cfapi_object_move(), cfapi_object_set_property(), cfapi_player_can_pay(), cfapi_player_knowledge(), cfapi_player_message(), cfapi_system_get_object_vector(), cflogger_globalEventListener(), cfpython_globalEventListener(), check_login(), choose_cult_monster(), clear_los(), clear_player(), command_abil(), command_addexp(), command_arrest(), command_banish(), command_execute(), command_find(), command_freeze(), command_kick2(), command_knowledge(), command_list(), command_passwd(), command_possess(), command_recollect(), command_reply(), command_reset(), command_rskill(), command_stack_list(), command_statistics(), command_stats(), command_summon(), command_teleport(), command_toggle_shout(), command_uskill(), command_whereabouts(), compute_price_variation_with_bargaining(), count_players(), count_unpaid(), create_player_cmd(), Crossfire_Party_GetPlayers(), detect_curse_on_item(), detect_magic_on_item(), display_who_entry(), dm_stack_peek(), dm_stack_pop(), dm_stack_push(), do_follow(), do_harvest(), do_server(), do_skill_detect_curse(), do_skill_detect_magic(), do_skill_ident(), do_tell(), do_update(), draw_client_map(), draw_client_map2(), draw_ext_info(), draw_ext_info_format(), draw_magic_map(), emergency_save(), empty_container(), enter_fixed_template_map(), enter_random_map(), enter_random_template_map(), esrv_add_spells(), esrv_del_item(), esrv_draw_look(), esrv_get_ob_from_count(), esrv_move_object(), esrv_new_player(), esrv_remove_spell(), esrv_send_inventory(), esrv_send_item(), esrv_send_pickup(), esrv_update_item(), esrv_update_spells(), esrv_update_stats(), evaluate_quest_conditions(), events_execute_global_event(), examine_cmd(), examine_weight_and_material(), ext_info_map(), ext_info_map_except(), ext_info_map_except2(), final_free_player(), find_best_apply_object_match(), find_best_object_match(), find_key(), find_or_create_connection_for_map(), find_player_options(), find_player_socket(), find_traps(), fix_luck(), fix_weight(), follower_remove_given_items(), free_player(), get_client_spell_state(), get_connection_rune(), get_dm_object(), get_msg_book(), get_nearest_criminal(), get_nearest_player(), get_or_create_quest(), get_other_player_from_name(), get_quest(), get_quest_by_number(), get_who_escape_code_value(), getPlayers(), give_initial_items(), globalEventListener(), handle_client(), handle_cmd(), hit_map(), identify(), identify_object_with_skill(), inscribe_scroll_cmd(), insert_objects(), is_perfect(), AssetWrapperPanel.itemChanged(), jump(), knowledge_alchemy_attempt(), knowledge_display(), knowledge_do_attempt(), knowledge_do_display(), knowledge_first_player_save(), knowledge_get_or_create(), knowledge_give(), knowledge_player_knows(), knowledge_process_incremental(), knowledge_read(), knowledge_send_known(), knowledge_show(), learn_skill(), leave(), list_players(), lock_item_cmd(), look_at_cmd(), magic_mapping_mark(), magic_mapping_mark_recursive(), make_perma_dead(), make_sure_not_seen(), make_sure_seen(), makes_invisible_to(), malloc_info(), mark_item_cmd(), meditate(), monster_cast_spell(), monster_use_bow(), monster_use_range(), monster_use_scroll(), monster_use_skill(), monsterFight(), move_cmd(), move_ob(), new_player_cmd(), object_decrease_nrof(), object_increase_nrof(), object_insert_in_ob(), object_matches_string(), object_remove(), object_update(), party_remove(), party_send_message(), path_to_player(), pay_for_amount(), pay_for_item(), pay_from_container(), pick_lock(), pick_up_object(), play_sound_map(), play_sound_player_only(), player_can_view(), player_get_delayed_buffer(), player_get_own_title(), player_get_title(), player_has_own_title(), player_set_dragon_title(), player_set_own_title(), player_set_state(), player_unready_range_ob(), players_on_map(), pray(), pray_at_altar(), process_players1(), process_players2(), quest_display(), quest_first_player_save(), quest_get_player_state(), quest_info(), quest_list(), quest_send_initial_states(), quest_set_player_state(), quest_set_state(), quest_start(), quest_was_completed(), rangetostring(), receive_play_again(), remove_force(), remove_if_unused(), reply_cmd(), ring_bell(), sack_can_hold(), save_and_kick_all_players(), save_player(), sell_item(), send_background_music(), send_changed_object(), send_delayed_buffers(), send_extra_stats(), send_plugin_custom_message(), send_tick(), send_updates(), set_dragon_name(), set_title(), set_up_cmd(), set_wall(), share_exp(), shop_pay_unpaid(), shop_pay_unpaid_callback(), singing(), skill_attack(), skill_ident(), START_TEST(), stop_jump(), swap_map(), try_leave_cult(), turn_one_transport(), update_all_los(), update_all_map_los(), update_players(), update_quests(), use_oratory(), write_note(), write_on_item(), and write_scroll().

◆ praying

altar_valkyrie.praying = pl.CheckArchInventory('skill_praying')

Definition at line 29 of file altar_valkyrie.py.

◆ res

◆ value

int altar_valkyrie.value = obj.Exp / 5 * part_factor

Definition at line 69 of file altar_valkyrie.py.