X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.cpp;h=fb3c4450112b84200270596827ad267ca97d4df8;hb=bdabd9d4a53be2fa9d90f900f7e5949d2f0ef75c;hp=cada57b293cdaa13af7c2ce55179d1cd23ff92c1;hpb=f83c7bc4ef12b0bbdc1cfa6bdce35d9665510e6c;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index cada57b..fb3c445 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -1468,14 +1468,15 @@ void Person::Reverse() velocity = 0; victim->velocity = 0; - if (aitype != playercontrolled) + if (aitype != playercontrolled) { feint = 0; - if (aitype != playercontrolled && Random() % 3 == 0 && escapednum < 2 && difficulty == 2) - feint = 1; - if (aitype != playercontrolled && Random() % 5 == 0 && escapednum < 2 && difficulty == 1) - feint = 1; - if (aitype != playercontrolled && Random() % 10 == 0 && escapednum < 2 && difficulty == 0) - feint = 1; + if (escapednum < 2) { + int chances = ((difficulty == 2) ? 3 : ((difficulty == 1) ? 5 : 10)); + if ((Random() % chances) == 0) { + feint = 1; + } + } + } if (victim->id == 0 && Animation::animations[victim->animTarget].attack == reversal) numreversals++;