mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 21:42:59 +00:00 
			
		
		
		
	crossbow:: piercing dragons
This commit is contained in:
		| @@ -157,7 +157,8 @@ EX bool canAttack(cell *c1, eMonster m1, cell *c2, eMonster m2, flagtype flags) | |||||||
|   if(isWorm(m2) && m2 != moTentacleGhost && !isDragon(m2)) return false; |   if(isWorm(m2) && m2 != moTentacleGhost && !isDragon(m2)) return false; | ||||||
|    |    | ||||||
|   // dragon can't attack itself, or player who mounted it |   // dragon can't attack itself, or player who mounted it | ||||||
|   if(c1 && c2 && isWorm(c1->monst) && isWorm(c2->monst) && wormhead(c1) == wormhead(c2) |   cell *cp = (flags & AF_BOW) ? cwt.at : c1; | ||||||
|  |   if(cp && c2 && isWorm(cp->monst) && isWorm(c2->monst) && wormhead(cp) == wormhead(c2) | ||||||
|     && m1 != moTentacleGhost && m2 != moTentacleGhost) |     && m1 != moTentacleGhost && m2 != moTentacleGhost) | ||||||
|     return false; |     return false; | ||||||
|      |      | ||||||
|   | |||||||
| @@ -101,7 +101,7 @@ EX int create_path() { | |||||||
|       if(thruVine(cw2.at, cw2.peek())) continue; |       if(thruVine(cw2.at, cw2.peek())) continue; | ||||||
|  |  | ||||||
|       if(cw2.at->monst) { |       if(cw2.at->monst) { | ||||||
|         flagtype attackflags = AF_NORMAL; |         flagtype attackflags = AF_BOW; | ||||||
|         if(items[itOrbSpeed]&1) attackflags |= AF_FAST; |         if(items[itOrbSpeed]&1) attackflags |= AF_FAST; | ||||||
|         if(items[itOrbSlaying]) attackflags |= AF_CRUSH; |         if(items[itOrbSlaying]) attackflags |= AF_CRUSH; | ||||||
|         if(items[itCurseWeakness]) attackflags |= AF_WEAK; |         if(items[itCurseWeakness]) attackflags |= AF_WEAK; | ||||||
| @@ -265,7 +265,7 @@ EX void add_fire(cell *c) { | |||||||
|   } |   } | ||||||
|  |  | ||||||
| EX void shoot() { | EX void shoot() { | ||||||
|   flagtype attackflags = AF_NORMAL; |   flagtype attackflags = AF_BOW; | ||||||
|   if(items[itOrbSpeed]&1) attackflags |= AF_FAST; |   if(items[itOrbSpeed]&1) attackflags |= AF_FAST; | ||||||
|   if(items[itOrbSlaying]) attackflags |= AF_CRUSH; |   if(items[itOrbSlaying]) attackflags |= AF_CRUSH; | ||||||
|   if(items[itCurseWeakness]) attackflags |= AF_WEAK; |   if(items[itCurseWeakness]) attackflags |= AF_WEAK; | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								hyper.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								hyper.h
									
									
									
									
									
								
							| @@ -636,6 +636,7 @@ typedef function<int(struct cell*)> cellfunction; | |||||||
| #define AF_PLAGUE            Flag(32)   // Orb of Plague (do not check adjacency) | #define AF_PLAGUE            Flag(32)   // Orb of Plague (do not check adjacency) | ||||||
| #define AF_PSI               Flag(33)   // Orb of the Mind | #define AF_PSI               Flag(33)   // Orb of the Mind | ||||||
| #define AF_WEAK              Flag(34)   // Curse of Weakness | #define AF_WEAK              Flag(34)   // Curse of Weakness | ||||||
|  | #define AF_BOW               Flag(35)   // crossbow attack | ||||||
|  |  | ||||||
| #if CAP_SDL | #if CAP_SDL | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue