Function Name pkmnBattle Inputs 1 double A 1x7 vector repres

Function Name: pkmnBattle Inputs: 1. (double) A 1x7 vector representing the statistics of your Pokemon 2. (double) A 1x7 vector representing the statistics of your rival\'s Pokemon 3. (double) A 4x3 array representing the moves that your Pokemon knows 4. (double) A 4x3 array representing the moves that your rival\'s Pokemon knows outputs 1. (char) A string describing the outcome of the battle Background You are a Pokemon Trainer on an epic journey through the Midtown region. After collecting eight gym badges, defeating Team u(sic)ga, and beating the Elite Forty-Two CS 1371 TAS, you arrive at the Champion\'s Room and find your rival, George P. Burdell, who you must defeat to become the Pokemon Champion. In order to win this epic showdown, you think it will be helpful to know if your Pokemon or your rival\'s Pokemon will faint first, so you decide to code a function in MATLAB to help determine who wins! Function Description: The function takes in the statistics of both Pokemon as row vectors containing: Level, HP, Attack, Defense, Special Attack, Special Defense Speed], always in that order. The function also takes in the four moves that each Pokemon knows. A Pokemon\'s moveset is depicted as a 4x3 array, where each row corresponds to a move and contains the [Base Power, PP, Type] of the move. PP is the number of times a move can be used, and Type is either 0, for physical moves, or 1, for special moves. The amount of damage done by a move can be calculated from the formula below: 2x Level 10 Attack Damage x Base 2 Defense 250 Base is the Base Power of the move and Level comes from the Pokemon using the move. If the move is physical, use the attacking Pokemon\'s Attack and its opponent\'s Defense, but if the move is special, use Special Attack and Special Defense. Whichever Pokemon has the higher speed stat goes first. The Pokemon take turns attacking each other with its most powerful move, decreasing the others HP by the amount of damage done by that move. Every time a move is used, its PP should decrease by one until i hits zero, at which point it can no longer be used. The first Pokemon that has 0 or fewer HP faints and loses. If you win the battle, the function should output the following statement: Congratulations Champion of the Pokemon League! Your Pokemon survived with

Solution

images1 = images1(pairsUsed); figure; for i = 1:numel(images1) I = imread(images1{i}); subplot(2,2,i); imshow(I); hold on; plot(imagePoints(:,1,i,1),imagePoints(:,2,i,1),\'ro\'); end annotation(\'textbox\',[0 0.9 1 0.1],\'String\',\'Camera 1\',... \'EdgeColor\',\'none\',\'HorizontalAlignment\',\'center\')
 Function Name: pkmnBattle Inputs: 1. (double) A 1x7 vector representing the statistics of your Pokemon 2. (double) A 1x7 vector representing the statistics of

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site