anchor.diff:  fail({Props, _, _}) ->
       Props.
   
  -attack(Props) ->
  -    Character = proplists:get_value(character, Props),
  -    Target = proplists:get_value(target, Props),
  -    Types = proplists:get_value(attack_types, Props, []),
  -    Hit = calc_hit(Props, Types),
  -    Message = {Character, calc, Types, hit, Hit, on, Target, with, self()},
  -    gerlshmud_object:attempt(self(), Message).
  -
  -calc_hit(Props, Types) ->
  -    Action = proplists:get_value(attack_action, Props),
  -    HitBase = proplists:get_value(attack_roll, Props, 0),
  -    Modifier = proplists:get_value(attack_hit_modifier, Props, 0),
  -    Modifier = gerlshmud_modifiers:modifier(Props, attack, Action, Types),
  -    random(HitBase) + Modifier.
  -
  -random(0) ->
  -    0;
  -random(Int) ->
  -    rand:uniform(Int).
  -
   should_defend(Props) ->
       ShouldDefend = proplists:get_value(should_defend_module, Props),
       ShouldDefend(Props).
   
  -unreserve(Character, Props) when is_list(Props) ->
  -    [unreserve(Character, Resource) || {Resource, _Amt} <- proplists:get_value(resources, Props, [])];
  -unreserve(Character, Resource) ->
  -    gerlshmud_object:attempt(self(), {Character, unreserve, Resource, for, self()}).
  +roll(_Roll = 0, Base) ->
  +    Base;
  +roll(Roll, Base) ->
  +    rand:uniform(Roll) + Base.
   
  -reserve(Character, Props) when is_list(Props) ->
  -    [reserve(Character, Resource, Amount) || {Resource, Amount} <- proplists:get_value(resources, Props, [])].
  -
  -reserve(Character, Resource, Amount) ->
  -    gerlshmud_object:attempt(self(), {Character, reserve, Amount, 'of', Resource, for, self()}).
  -
  -update_allocated(New, Type, Props) ->
  -    Allocated = proplists:get_value(allocated_resources, Props, #{}),
  -    Curr = maps:get(Type, Allocated, 0),
  -    Allocated#{Type => Curr + New}.
  -
  -deallocate(Allocated, Required) ->
  -    lists:foldl(fun subtract_required/2, Allocated, Required).
  -
  -subtract_required({Type, Required}, Allocated) ->
  -    #{Type := Amt} = Allocated,
  -    Allocated#{Type := min(0, Amt - Required)}.
  -
  -has_resources(Allocated, Required) ->
  -    {_, AllocApplied} = lists:foldl(fun apply_resource/2, {Allocated, []}, Required),
  -    case lists:filter(fun is_resource_lacking/1, AllocApplied) of
  -        [] ->
  -            true;
  -        _ ->
  -            false
  -    end.
  -
  -apply_resource(_Resource = {Type, Required},
  -               {Allocated, Applied0}) ->
  -    AllocAmt = maps:get(Type, Allocated, 0),
  -    Applied1 = [{Type, Required - AllocAmt} | Applied0],
  -    {Allocated#{Type => 0}, Applied1}.
  -
  -is_resource_lacking({_Type, Amount}) when Amount =< 0 ->
  -    false;
  -is_resource_lacking(_) ->
  -    true.
  -
  -log(Props) ->
  -    gerlshmud_event_log:log(debug, [{module, ?MODULE} | Props]).
  +%% log(Props) ->
  +%%     gerlshmud_event_log:log(debug, [{module, ?MODULE} | Props]).
  
positive.code: %% Defend
  attempt({#parents{character = Character},
           Props,
           {Attacker, calc, Types, hit, Hit, on, Character, with, Attack}}) ->
      Log = [{?SOURCE, Attacker},
             {?EVENT, calc_hit},
             {hit, Hit},
             {?TARGET, Character},
             {vector, AttackVector}],
      case should_defend(Props) of
          true ->
              case gerlshmud_modifiers:modifier(Props, defence, hit, Types) of
              %case proplists:get_value(defence_hit_modifier, Props) of
                  0 ->
                      {succeed, false, Props, Log};
                  Amount ->
                      {succeed,
                       {Attacker, calc, Types, hit, Hit - Amount, on, Character, with, AttackVector},
                       true,
                       Props,
                       Log}
  
negative.code:             {succeed, false, Props, Log}
      end;
  
  attempt({_, _, _Msg}) ->
      undefined.
  
  succeed({Props, _}) ->
      Props.
  