Page MenuHomeFeedback Tracker

[Feature Request] Increase difficult to destroy Combination Lock(4)
Closed, ResolvedPublic

Description

actiondestroycombinationlock.c

I was modded this class for too difficult and random ;)

modded class ActionDestroyCombinationLock: ActionContinuousBase
{
	
  override void OnFinishProgressServer( ActionData action_data )
	{
    static float MODIFIER = 6.25;

		Fence fence = Fence.Cast( action_data.m_Target.GetObject() );
		if ( fence )
		{
			CombinationLock combination_lock = fence.GetCombinationLock();
			if ( combination_lock )
			{
        // Если замок четырёхзначный, то увеличиваем его ломание в два раза
        if ( combination_lock.ClassName() == "CombinationLock4" )
        {
          MODIFIER = 4.17;
        }

        combination_lock.DecreaseHealth("", "", MODIFIER);
				
        if ( combination_lock.IsDamageDestroyed() )
				{
					combination_lock.UnlockServer( action_data.m_Player, fence );
					GetGame().GetCallQueue( CALL_CATEGORY_GAMEPLAY ).CallLater( combination_lock.DestroyLock, 200, false );
				}
			}
		}
		
		// Добавляем условие, что если состояние Damaged, то есть шанс, что ножовка не перейдёт в состояние Badly Damaged, а сразу станет Ruined

    if ( action_data.m_MainItem.GetHealthLevel() == GameConstants.STATE_DAMAGED && Math.RandomInt(0, 2) == 1)
    {
      action_data.m_MainItem.DecreaseHealth( UADamageApplied.SAW_LOCK, false );  
    }
    else {
      action_data.m_MainItem.DecreaseHealth( UADamageApplied.SAW_LOCK - 1, false );
    }
		
		//soft skills
		action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
	}
};

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

PR9INICHEK added a subscriber: Geez.

@Geez hi :)

Please check this ticket ;)

Relates to T153482

@Geez please close this ticket

Geez closed this task as Resolved.Sep 7 2020, 1:21 PM
Geez claimed this task.