Peón
Barra de Salud : 
Mensajes : 57
Reputación : 5 Monedas de oro : 318 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Hechizo que rebota Vie Oct 09, 2020 4:49 pm | |
| Hola, tiempo que no publico en el foro XD Estoy haciendo razas personalizadas y una habilidad que le di a una de las unidades (dragón eléctrico de Clash of Clans) me pareció lo suficientemente interesante como para hacer un post al respecto La habilidad consiste en que cada vez que ataca salen rayos similares a los de la habilidad "cadena de relámpagos" rebotando entre los enemigos e infligiendo daño caos. Con modificaciones simples pueden usarla como base para, por ejemplo, hacer un hechizo basado en channel que rebote causando algún buff/debuff o cualquier otro efecto También puede modificarse para escalar, por ejemplo, con atributos de héroe, nivel de la habilidad o cualquier otro factor El trigger lo llené de comentarios para convertirlo en una especie de tutorial Sean libres de usarlo como base para hechizos (para eso lo subí), no necesitan darme créditos por algo tan simple XD Les dejo el trigger, una screenshot y el mapa: - Detonador:
-
Elect_Area es un grupo de unidades y las demás variables son del tipo unidad [gui]Ataque dragon electrico Events Unit - A unit Is attacked Conditions (Unit-type of (Attacking unit)) Equal to Dragón eléctrico Actions -------- *Se puede cambiar el evento y condición para que se active, por ejemplo, al castear una habilidad de canal -------- -------- Seteamos variables -------- Set VariableSet Elect_Dragon = (Attacking unit) Set VariableSet Elect_1 = (Attacked unit) -------- Definimos los posibles objetivos para el rebote -------- Set VariableSet Elect_Area = (Units within 300.00 of (Position of Elect_1) matching ((((Triggering unit) belongs to an enemy of (Owner of Elect_Dragon).) Equal to Verdadero) and (((Triggering unit) is alive) Equal to Verdadero)).) Unit Group - Remove Elect_1 from Elect_Area. -------- Repetimos los procesos anteriores, encargándonos de que una unidad no reciba 2 rebotes -------- Set VariableSet Elect_2 = (Random unit from Elect_Area) Set VariableSet Elect_Area = (Units within 300.00 of (Position of Elect_2) matching ((((Triggering unit) belongs to an enemy of (Owner of Elect_Dragon).) Equal to Verdadero) and (((Triggering unit) is alive) Equal to Verdadero)).) Unit Group - Remove Elect_1 from Elect_Area. Unit Group - Remove Elect_2 from Elect_Area. Set VariableSet Elect_3 = (Random unit from Elect_Area) Set VariableSet Elect_Area = (Units within 300.00 of (Position of Elect_3) matching ((((Triggering unit) belongs to an enemy of (Owner of Elect_Dragon).) Equal to Verdadero) and (((Triggering unit) is alive) Equal to Verdadero)).) Unit Group - Remove Elect_1 from Elect_Area. Unit Group - Remove Elect_2 from Elect_Area. Unit Group - Remove Elect_3 from Elect_Area. Set VariableSet Elect_4 = (Random unit from Elect_Area) Set VariableSet Elect_Area = (Units within 300.00 of (Position of Elect_4) matching ((((Triggering unit) belongs to an enemy of (Owner of Elect_Dragon).) Equal to Verdadero) and (((Triggering unit) is alive) Equal to Verdadero)).) Unit Group - Remove Elect_1 from Elect_Area. Unit Group - Remove Elect_2 from Elect_Area. Unit Group - Remove Elect_3 from Elect_Area. Unit Group - Remove Elect_4 from Elect_Area. Set VariableSet Elect_5 = (Random unit from Elect_Area) -------- Creamos el rayo desde el caster al objetivo -------- Lightning - Create a Lightning Attack lightning effect from source (Position of Elect_Dragon) to target (Position of Elect_1) -------- Se lanzan los rebotes verificando que la unidad existe (si no verificamos es posible que algunos rayos salgan volando al infinito) -------- If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Elect_2 is in (Units in (Playable map area)).) Equal to Verdadero Then - Actions -------- Efecto visual del rayo -------- Lightning - Create a Chain Lightning - Secondary lightning effect from source (Position of Elect_1) to target (Position of Elect_2) -------- Daño del rayo -------- Unit - Cause Elect_Dragon to damage Elect_2, dealing 80.00 damage of attack type Chaos and damage type Normal -------- Se pueden agregar otros efectos -------- Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Elect_3 is in (Units in (Playable map area)).) Equal to Verdadero Then - Actions Lightning - Create a Chain Lightning - Secondary lightning effect from source (Position of Elect_2) to target (Position of Elect_3) Unit - Cause Elect_Dragon to damage Elect_3, dealing 60.00 damage of attack type Chaos and damage type Normal Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Elect_4 is in (Units in (Playable map area)).) Equal to Verdadero Then - Actions Lightning - Create a Chain Lightning - Secondary lightning effect from source (Position of Elect_3) to target (Position of Elect_4) Unit - Cause Elect_Dragon to damage Elect_4, dealing 40.00 damage of attack type Chaos and damage type Normal Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Elect_5 is in (Units in (Playable map area)).) Equal to Verdadero Then - Actions Lightning - Create a Chain Lightning - Secondary lightning effect from source (Position of Elect_4) to target (Position of Elect_5) Unit - Cause Elect_Dragon to damage Elect_5, dealing 20.00 damage of attack type Chaos and damage type Normal Else - Actions Do nothing -------- Limpiamos -------- Set VariableSet Elect_Dragon = No unit Set VariableSet Elect_1 = No unit Set VariableSet Elect_2 = No unit Set VariableSet Elect_3 = No unit Set VariableSet Elect_4 = No unit Set VariableSet Elect_5 = No unit [/gui]
- Screenshot:
-
Comenta para descargar |
|
Peón
Barra de Salud : 
Mensajes : 57
Reputación : 5 Monedas de oro : 318 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Hechizo que rebota Lun Oct 12, 2020 8:22 pm | |
| |
|
Peón
Barra de Salud : 
Mensajes : 57
Reputación : 5 Monedas de oro : 318 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Hechizo que rebota Mar Oct 20, 2020 2:32 pm | |
| Hay que cambiar los "Triggering unit" por "Matching unit" cada vez que seteamos "Elect_Area" |
|
Héroe

Barra de Salud : 
Mensajes : 1736
Reputación : 429 Monedas de oro : 9498 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Hechizo que rebota Miér Oct 21, 2020 11:47 am | |
| Igual, gracias por compartirlo.  (Click a la Firma para Entrar) |
|
Iniciado

Barra de Salud : 
Mensajes : 2
Reputación : 0 Monedas de oro : 6 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Hechizo que rebota Mar Oct 27, 2020 3:02 pm | |
| WoW bro espero que funcione de paso vere si puedo modificarlo  |
|
Aprendiz
Barra de Salud : 
Mensajes : 13
Reputación : 0 Monedas de oro : 13 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Hechizo que rebota Jue Nov 19, 2020 8:43 pm | |
| |
|
 | (#) Tema: Re: Hechizo que rebota  | |
| |
|